Skip to content

Commit

Permalink
Fix: Use react-dom/server.browser when reactRoot: true (vercel#34116
Browse files Browse the repository at this point in the history
)

Since we want to use the streaming renderer when `reactRoot: true`, we have to make sure we use the right server implementation too.
  • Loading branch information
devknoll authored and natew committed Feb 16, 2022
1 parent 108287b commit c9f207b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/next/server/render.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1175,7 +1175,7 @@ export async function renderToHTML(
return inAmpMode ? children : <div id="__next">{children}</div>
}

const ReactDOMServer = hasConcurrentFeatures
const ReactDOMServer = reactRoot
? require('react-dom/server.browser')
: require('react-dom/server')

Expand Down

0 comments on commit c9f207b

Please sign in to comment.