Closed
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
432ce64 to
5ea1034
Compare
5ea1034 to
3fcdda7
Compare
tobiaslins
approved these changes
Feb 24, 2026
Collaborator
tobiaslins
left a comment
There was a problem hiding this comment.
thank you! i hope we can finally get the real route from Nextjs
Member
Author
|
After discussion with @tobiaslins, we're not gonna fix this in the this package, this should be addressed in Next.js instead |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🖖 What's in there?
This PR includes Nextjs parallel routes besteffort support.
🤺 How to test?
There are two new routes in the nextjs-15 demo app: /parallel-routes/dashboard and parallel-routes/settings.
Open the dev tools and check in console for the detected route and actual path.
🔬Notes to reviewers
In Next.js App Router,
useParams()merges params from all active route segments, including parallel route slots (@folderconvention). When a layout has a slot with a catch-all segment (e.g.,@sidebar/[...catchAll]/page.tsx), that slot's params appear inuseParams()even though they don't correspond to the URL structure.The bug: on a static route like
/parallel-routes/dashboard,useParams()returns{ catchAll: ['dashboard'] }(from the sidebar slot).computeRoute('/parallel-routes/dashboard', { catchAll: ['dashboard'] })then produces/parallel-routes/[...catchAll]instead of the correct static path.The reproduction is already built at apps/nextjs-15/src/app/parallel-routes/.
How It Handles Each Scenario
{ catchAll: ['dashboard'] }['parallel-routes', 'dashboard'](no slash segments){}/parallel-routes/dashboard✅{ id: '123', catchAll: ['123','d','t'] }['p-r', '123', 'detail', 'test']{ id: '123' }/docs/[...slug](single-segment){ slug: ['intro'] }['docs', 'intro'](no slash){}/docs/intro/docs/[...slug](multi-segment){ slug: ['api', 'ref'] }['docs', 'api/ref']{ slug: ['api', 'ref'] }/docs/[...slug]✅{ id: '123' }null/path/[id]✅