Skip to content

Commit b249148

Browse files
docs: fix code error in route-paths.md
1 parent b7fffc4 commit b249148

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎docs/guide/route-paths.md‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,9 @@ const userRoute = new Route({
9595
path: '$userId',
9696
})
9797

98-
const routeConfig = rootRoute.addChildren([userBaseRoute])
98+
const routeConfig = rootRoute.addChildren([
99+
usersRoute.addChildren([userRoute])
100+
])
99101
```
100102

101103
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`:

0 commit comments

Comments
 (0)