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(pages): update slug value for optional catch all routes #64381

Merged
merged 3 commits into from
Apr 13, 2024

Conversation

hungdoansy
Copy link
Contributor

@hungdoansy hungdoansy commented Apr 12, 2024

Why?

When you do, →

  const router = useRouter()
  console.log('[test] router =', router.query.slug)

the value of router.query.slug should be undefined in this instance.

(screenshot from current docs)
CleanShot 2024-04-13 at 00 18 14@2x

it should be slug: undefined.

@hungdoansy hungdoansy requested review from a team as code owners April 12, 2024 07:10
@hungdoansy hungdoansy requested review from manovotny and leerob and removed request for a team April 12, 2024 07:10
@samcx
Copy link
Member

samcx commented Apr 12, 2024

@hungdoansy Can you clarify how you came to this conclusion in the description of the :pr:?

@hungdoansy
Copy link
Contributor Author

@hungdoansy Can you clarify how you came to this conclusion in the description of the :pr:?

Hi, please check out my preview link here:
https://next-router-ashen.vercel.app/route
https://next-router-ashen.vercel.app/route/a
https://next-router-ashen.vercel.app/route/a/b/c/d/

Source code is here: https://github.com/hungdoansy/next-router

@samcx samcx changed the title Update 02-dynamic-routes.mdx docs(pages): update slug value for optional catch all routes Apr 13, 2024
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.

:lgtm:

@ijjk
Copy link
Member

ijjk commented Apr 13, 2024

Allow CI Workflow Run

  • approve CI run for commit: 7cea829

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

@samcx samcx enabled auto-merge (squash) April 13, 2024 04:21
@samcx samcx merged commit 904908c into vercel:canary Apr 13, 2024
32 checks passed
@hungdoansy hungdoansy deleted the patch-2 branch April 13, 2024 05:27
@hungdoansy
Copy link
Contributor Author

hungdoansy commented Apr 13, 2024

Thanks @samcx for helping me edit the PR description. I will put more texts next time.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 27, 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