Skip to content

Commit

Permalink
docs: fix default.js params example (#64748)
Browse files Browse the repository at this point in the history
The `params` example in the docs for `default.js` have the slot/params
in the wrong order, giving the impression that you can deeply nest
`default` slots.

This clarifies that the params received by a slot are based on the
dynamic params leading up to the segment containing the slot.

Fixes #64708


Closes NEXT-3160
  • Loading branch information
ztanner authored Apr 18, 2024
1 parent adf7529 commit 89b88ee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/02-app/02-api-reference/02-file-conventions/default.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ An object containing the [dynamic route parameters](/docs/app/building-your-appl

| Example | URL | `params` |
| ------------------------------------------ | ------------ | ----------------------------------- |
| `app/@sidebar/[artist]/default.js` | `/zack` | `{ artist: 'zack' }` |
| `app/@sidebar/[artist]/[album]/default.js` | `/zack/next` | `{ artist: 'zack', album: 'next' }` |
| `app/[artist]/@sidebar/default.js` | `/zack` | `{ artist: 'zack' }` |
| `app/[artist]/[album]/@sidebar/default.js` | `/zack/next` | `{ artist: 'zack', album: 'next' }` |

0 comments on commit 89b88ee

Please sign in to comment.