Closed davidck closed 8 years ago
I just stumbled on the dynamic routing features. Maybe this will be a solution.
Yep, dynamic routing! Also you can split up your routes on a file-basis pretty easily, if you declare them without JSX. See: https://github.com/rackt/react-router/blob/latest/docs/guides/basics/RouteConfiguration.md#alternate-configuration
You can actually keep the JSX in separate files as well. Just use the following syntax:
import otherRoutes from './otherRoutes'
<Route path='/'>
{otherRoutes}
</Route>
Thanks! Will take a look at it.
Sorry for posting a question here...
Following the examples, I got redux-router working in my app. However, we found that at some point, centralizing all routes into one place isn't ideal. Is there a way to include multiple routers per app? For example, if I have a route to /client. I want to isolate all child routes inside of /client, such as /client/list, /client/add, etc...
Similar to this, basically allowing you to attach another router inside your component. https://github.com/STRML/react-router-component
Currently, I've attempted to include another provider+router within a component. Although it doesn't produce errors, it ignores all routing except for the root.