Rocon Website

Nested Routes

Sometimes, a nested useRoutes call is useful. If a component rendered under useRoutes makes another call of useRoutes, routes rendered by the secondary call are automatically treated as children of the parent route. Child route builders should be hidden inside a component so that the child routes are only accessible during the component is rendered.

This is an example of nested routes.

By clicking “Tab 2” or “Tab 3”, you are navigated to a URL like /tutorial/nested?tab=tab2.