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: Clarify the ability to access current route segments in layouts #53349

Merged
merged 3 commits into from Sep 2, 2023

Conversation

fuma-nama
Copy link
Contributor

Layouts do not have access to the current route segment(s). To access route segments, you can use useSelectedLayoutSegment or useSelectedLayoutSegments in a Client Component.

The term "current" is confusing.
It should be only the route segments under the layout. For example: app/layout.tsx can not access app/[slug].

@leerob leerob changed the title [Docs] Clarify the ability to access current route segments in layouts docs: Clarify the ability to access current route segments in layouts Sep 2, 2023
@kodiakhq kodiakhq bot merged commit f74f676 into vercel:canary Sep 2, 2023
47 checks passed
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 17, 2023
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