Skip to content

Commit

Permalink
update docs about catch all routes (#175)
Browse files Browse the repository at this point in the history
  • Loading branch information
andriijas authored Dec 6, 2024
1 parent 5e522d5 commit b4b1504
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions packages/rescript-relay-router/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,17 @@ Route names must:

Any routes put in another route's `children` is _nested_. In the example above, this means that the `Organization` route controls rendering of all of its child routes. This enables nested layouts, where layouts can stay rendered and untouched as URL changes in ways that does not affect them.

To create a "catch all" route, use the `*`, character as the route path. Typically used for the "not found" route. Example:

```json
[
{
"name": "NotFound",
"path": "*"
}
]
```

> The router uses the matching logic from [`react-router`](https://reactrouter.com/docs/en/v6) under the hood.
### Route renderers
Expand Down

0 comments on commit b4b1504

Please sign in to comment.