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

docs: update useParams examples and pages usage #61595

Conversation

paramoshkinandrew
Copy link
Contributor

Updated https://nextjs.org/docs/app/api-reference/functions/use-params with:

  • returns block, examples table: route with no dynamic parameters should return an empty object
  • returns block, pages usage: if useParams is used in pages it will return null only for the initial render and will update its value with dynamic parameters following the same rules as stated in the doc above this point.

@paramoshkinandrew paramoshkinandrew requested review from timeyoutakeit and lydiahallie and removed request for a team February 2, 2024 21:09
@paramoshkinandrew paramoshkinandrew force-pushed the docs/fix-useParams-example-and-pages-usage branch from d374bd9 to a3b4c75 Compare February 2, 2024 21:09
@ijjk
Copy link
Member

ijjk commented Feb 4, 2024

Allow CI Workflow Run

  • approve CI run for commit: 099e4d2

Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer

@paramoshkinandrew paramoshkinandrew force-pushed the docs/fix-useParams-example-and-pages-usage branch from ad81194 to 099e4d2 Compare February 4, 2024 23:37
Copy link
Member

@samcx samcx left a comment

Choose a reason for hiding this comment

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

Thank you for submitting a :pr:!

:lgtm:

@samcx samcx enabled auto-merge (squash) February 4, 2024 23:40
@samcx samcx merged commit 5ed493e into vercel:canary Feb 4, 2024
30 checks passed
@paramoshkinandrew paramoshkinandrew deleted the docs/fix-useParams-example-and-pages-usage branch February 5, 2024 16:33
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants