Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/canary' into basePathz
Browse files Browse the repository at this point in the history
  • Loading branch information
Janpot committed Aug 1, 2020
2 parents d3fcb4b + d0c57cf commit 19ac04c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions docs/routing/dynamic-routes.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,5 +108,6 @@ The `query` objects are as follows:
- `pages/post/[pid].js` - Will match `/post/1`, `/post/abc`, etc. But not `/post/create`
- `pages/post/[...slug].js` - Will match `/post/1/2`, `/post/a/b/c`, etc. But not `/post/create`, `/post/abc`
- Pages that are statically optimized by [Automatic Static Optimization](/docs/advanced-features/automatic-static-optimization.md) will be hydrated without their route parameters provided, i.e `query` will be an empty object (`{}`).
- When routing to a dynamic route using `Link` or `router`, you will need to specify the `href` as the dynamic route, for example `/post/[pid]` and `as` as the decorator for the URL, for example `/post/abc`.

After hydration, Next.js will trigger an update to your application to provide the route parameters in the `query` object.

0 comments on commit 19ac04c

Please sign in to comment.