Skip to content

Commit

Permalink
docs: fix code error in route-paths.md (#623)
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzocorallo committed Jul 8, 2023
1 parent b7fffc4 commit bd617e3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/guide/route-paths.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,9 @@ const userRoute = new Route({
path: '$userId',
})

const routeConfig = rootRoute.addChildren([userBaseRoute])
const routeConfig = rootRoute.addChildren([
usersRoute.addChildren([userRoute])
])
```

Dynamic segments can be accessed via the `params` object using the label you provided as the property key. For example, a path of `/users/$userId` would produce a `userId` param of `123` for the path `/users/123/details`:
Expand Down

0 comments on commit bd617e3

Please sign in to comment.