Commit 99f2d2a1 authored by Iurii Kucherov's avatar Iurii Kucherov Committed by Joe Haddad

Add a note for multiple dynamic route segments (#8359)

* Update README.md

* Update README.md

* Update README.md

* Update README.md
parent 57d91f7d
...@@ -331,6 +331,11 @@ The matched path parameter will be sent as a query parameter to the page. ...@@ -331,6 +331,11 @@ The matched path parameter will be sent as a query parameter to the page.
For example, the route `/post/abc` will have the following `query` object: `{ pid: 'abc' }`. For example, the route `/post/abc` will have the following `query` object: `{ pid: 'abc' }`.
Similarly, the route `/post/abc?foo=bar` will have the `query` object: `{ foo: 'bar', pid: 'abc' }`. Similarly, the route `/post/abc?foo=bar` will have the `query` object: `{ foo: 'bar', pid: 'abc' }`.
> Note: Multiple dynamic route segments work the same way.
>
> For example, `pages/post/[pid]/[comment].js` would match `/post/1/a-comment`.
> Its `query` object would be: `{ pid: '1', comment: 'a-comment' }`.
A `<Link>` for `/post/abc` looks like so: A `<Link>` for `/post/abc` looks like so:
```jsx ```jsx
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment