-
Notifications
You must be signed in to change notification settings - Fork 27.5k
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
Error: No selected layout segment below the current level #41878
Comments
related to #41879 |
having the same error - here is the repo that reproduces the issue: https://github.com/alex-marinov/nextjs13-testapp |
I've used useSelectedLayoutSegments() as a workaround;
|
Above suggestion works for me as well. Wonder why this bug exists... but Sam Selikoff's video didnt encounter this |
I had a quick look at his repo, and looks like nextjs version he is using doesn't have the update that throws error. I've managed to find the line that throws this error;
|
When `useSelectedLayoutSegment` is used on the current level or in a page it should return null. fixes #41879 fixes #41878 ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have a helpful link attached, see `contributing.md` ## Feature - [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. - [ ] Errors have a helpful link attached, see `contributing.md` ## Documentation / Examples - [ ] Make sure the linting passes by running `pnpm build && pnpm lint` - [ ] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Verify canary release
Provide environment information
What browser are you using? (if relevant)
Brave
How are you deploying your application? (if relevant)
No response
Describe the Bug
I was following guide from Next.js Conf (Stage J) for Next.js 13, and I keep getting this error
Error: No selected layout segment below the current level
when trying to useuseSelectedLayoutSegment
hook in client componentExpected Behavior
I can use
useSelectedLayoutSegment
hook in a way i believe it works in client componentLink to reproduction
https://github.com/TurniXXD/next-13
To Reproduce
experimental: { appDir: true }
configThe text was updated successfully, but these errors were encountered: