blob: 366c78b492ae2fedd2881eb32de1211cf2886678 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
API: `NotFoundRoute` (component)
===============================
When a parent's URL partially matches, but none of the children do, a
`NotFoundRoute` will be matched and its handler rendered at any level of
your route/view hierarchy.
Props
-----
See [Route::props][routeProps]
Example
-------
```xml
<Routes>
<Route path="/" handler={App}>
<Route name="course" path="course/:courseId" handler={Course}>
<Route name="course-dashboard" path="dashboard" />
<!-- ie: `/course/123/foo` -->
<NotFoundRoute handler={CourseRouteNotFound} />
</Route>
<!-- ie: `/flkjasdf` -->
<NotFoundRoute handler={NotFound} />
</Route>
</Routes>
```
The last `NotFoundRoute` will render inside the `App`, the first will
rendering inside of `Course`.
[routeProps]:/docs/api/components/Route.md#props
|