Closed
Description
Very useful for when you want to split your routes into different sections:
var ContactsRoutes = require("contactRoutes");
...
<Routes>
<Route path="/" handler={home}>
{ContactsRoutes}
{BookingRoutes}
{ItemsRoutes}
</Route>
</Routes>
Currently, the above solution works, but only as long as you only have one <Route>
with nested child routes within your required Routesmodules (e.g. ContactsRoutes
).
It doesn't work if I have multiple routes inside of ContactsRoutes, which are not nested, because of JSX not allowing multiple adjacent components.
My suggestion is to reuse <Routes>
as a container (with no additional behavior).
Metadata
Metadata
Assignees
Labels
No labels