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

Pages router: Enable strict next/head children reconciler by default #65418

Merged
merged 1 commit into from
May 11, 2024

Conversation

eps1lon
Copy link
Member

@eps1lon eps1lon commented May 6, 2024

Enables the new hext/head children reconciler introduced in #65408 by default.

The non-strict one is not compatible with React 19. To opt-out, explicitly set experimental.strictNextHead to false. undefined or null will still enable the new reconciler.

Closes NEXT-3330

@ijjk ijjk added created-by: Next.js team PRs by the Next.js team. type: next labels May 6, 2024
@eps1lon eps1lon force-pushed the sebbie/enable-new-head-reconciler branch from 532b7be to f239d24 Compare May 6, 2024 17:56
@ijjk ijjk added the tests label May 6, 2024
@eps1lon eps1lon marked this pull request as ready for review May 7, 2024 09:36
Comment on lines +191 to 192
/** @default true */
strictNextHead?: boolean
Copy link
Member

@ijjk ijjk May 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this was experimental I think we can remove it, unless there's still a valid case for disabling?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@timneutkens mentioned that some people may complain for SEO reasons even though extra attributes do not affect it. At least that's what happened in the past he said.

If this comes up, and people don't provide evidence that strictNextHead: true is bad, we can offer strictNextHead: false as an escape hatch. Client-side updates to next/head children would be broken but at least it would fix their imagined SEO issues.

But practically, I want to remove this soon after Next.js 15 is out stable. vercel/front is running with strictNextHead for a while by that time so it should've had sufficient soak-time.

@eps1lon eps1lon merged commit 9084a09 into canary May 11, 2024
78 of 80 checks passed
@eps1lon eps1lon deleted the sebbie/enable-new-head-reconciler branch May 11, 2024 10:50
panteliselef pushed a commit to panteliselef/next.js that referenced this pull request May 20, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants