From c9f207b908ab13d819b4b3a2d7d40935e463be93 Mon Sep 17 00:00:00 2001 From: Gerald Monaco Date: Tue, 8 Feb 2022 19:48:52 -0800 Subject: [PATCH] Fix: Use `react-dom/server.browser` when `reactRoot: true` (#34116) Since we want to use the streaming renderer when `reactRoot: true`, we have to make sure we use the right server implementation too. --- packages/next/server/render.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/next/server/render.tsx b/packages/next/server/render.tsx index cf73919b4df676..7976f6c7eda06c 100644 --- a/packages/next/server/render.tsx +++ b/packages/next/server/render.tsx @@ -1175,7 +1175,7 @@ export async function renderToHTML( return inAmpMode ? children :
{children}
} - const ReactDOMServer = hasConcurrentFeatures + const ReactDOMServer = reactRoot ? require('react-dom/server.browser') : require('react-dom/server')