Skip to content

Commit

Permalink
Added example to doc (#236)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderKaran authored Mar 22, 2024
1 parent 273e691 commit eab782d
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions docs/router/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,19 @@ export const routes = [
];
```

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

```js
export const routes = [
{
path: '/user/:userId',
name: 'USER',
component: User,
resources: [userResource],
},
];
```

## History

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
Expand Down

0 comments on commit eab782d

Please sign in to comment.