Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: JJ Kasper <jj@jjsweb.site>
  • Loading branch information
lfades and ijjk authored Sep 1, 2020
1 parent 30bb9fa commit a57b4b7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/routing/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export default Posts

> [`encodeURIComponent`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent) is used in the example to keep the path utf-8 compatible.
Alternatively, using an URL Object:
Alternatively, using a URL Object:

```jsx
import Link from 'next/link'
Expand All @@ -127,7 +127,7 @@ function Posts({ posts }) {
export default Posts
```

Now, instead of using interpolation to create the path, we use an URL object in `href` where:
Now, instead of using interpolation to create the path, we use a URL object in `href` where:

- `pathname` is the name of the page in the `pages` directory. `/blog/[slug]` in this case.
- `query` is an object with the dynamic segment. `slug` in this case.
Expand Down

0 comments on commit a57b4b7

Please sign in to comment.