Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use hasConcurrentFeatures instead of reactRoot as the condition of Fizz #35407

Merged
merged 3 commits into from Mar 17, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/next/server/render.tsx
Expand Up @@ -449,7 +449,7 @@ export async function renderToHTML(
devOnlyCacheBusterQueryString,
supportsDynamicHTML,
images,
reactRoot,
// reactRoot,
runtime,
ComponentMod,
AppMod,
Expand Down Expand Up @@ -1216,7 +1216,7 @@ export async function renderToHTML(
return inAmpMode ? children : <div id="__next">{children}</div>
}

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

Expand Down Expand Up @@ -1339,7 +1339,7 @@ export async function renderToHTML(
)
}

if (reactRoot) {
if (hasConcurrentFeatures) {
bodyResult = async (suffix: string) => {
// this must be called inside bodyResult so appWrappers is
// up to date when getWrappedApp is called
Expand Down