Skip to content

Commit eab782d

Browse files
Added example to doc (#236)
1 parent 273e691 commit eab782d

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

docs/router/configuration.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,19 @@ export const routes = [
3535
];
3636
```
3737

38+
When passing path params to a route, ensure you use the `:` prefix. For example, if you want to pass a `userId` to a route, you would do so like this
39+
40+
```js
41+
export const routes = [
42+
{
43+
path: '/user/:userId',
44+
name: 'USER',
45+
component: User,
46+
resources: [userResource],
47+
},
48+
];
49+
```
50+
3851
## History
3952

4053
You must provide a `history` instance to the router. Again, this will feel familiar to users of `react-router`. Here is how to do this

0 commit comments

Comments
 (0)