[docs][nextjs] Migrate from deprecated "legacyBehavior" prop #44871
+100
−267
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I wanted to fix something else (simpler actually 😆) on the docs, but then I got stopped by:
I created vercel/next.js#74334 to fix the root problem.
Now, I don't know how fast Next.js reviews PR. If it's like us, it might not happen soon enough, I want this fixed now 😄. More importantly, using a prop (
legacyBehavior
) that has been flagged as legacy for over two years (proof https://nextjs.org/blog/next-13#breaking-changes) in the examples and docs is a redflag for developers that are looking to operate at the forefront of what's done best in the frontend space. Hence this PR, it's going after point 1. in #38092.Preview: https://deploy-preview-44871--material-ui.netlify.app/
This is tricky to test, there are so many pages and links, I suspect regressions are likely.