Skip to content

Latest commit

 

History

History
36 lines (26 loc) · 827 Bytes

NotFoundRoute.md

File metadata and controls

36 lines (26 loc) · 827 Bytes

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

Example

<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.