-
Notifications
You must be signed in to change notification settings - Fork 27k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: docs for dynamic routing in next 15 (#71531)
### What? Fixes the `params` prop in https://nextjs.org/docs/canary/app/building-your-application/routing/dynamic-routes Also fixes a typo: `synchronoulsy` -> `synchronously` ### Why? There is a breaking change in `next@15.0.0-rc.1`: https://nextjs.org/blog/next-15-rc2#async-request-apis-breaking-change Although the api docs have been updated, these have not been. ### How? updates the docs. (relevant) build and lint passes locally. ran the prettier fix. --------- Co-authored-by: JJ Kasper <jj@jjsweb.site>
- Loading branch information
1 parent
5a54933
commit 96d6a96
Showing
7 changed files
with
28 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
96d6a96
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be good to also highlight the the client components that are affected by the async params change, as it is futher described in the version 15 migration docs
Usage Patterns for Dynamic Routes
Server Component (Default)
Client Component
Temporary Legacy Support
The key differences are:
async/await
use
hook from ReactChoose the appropriate pattern based on whether your component needs to be client-side (e.g., for interactivity) or can remain a server component (recommended when possible).