You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 15, 2018. It is now read-only.
Have you ever though about a replaceRoutes method on the store ?
The case study I have in mind is code splitting. In fact this case study is not only in my mind :
I am working on a web app (Typescript / React / Redux) and I'm currently switching from react-router-redux to redux-little-router (because it will simplify a lot of stuff). With react-router the routes object wasn't split because react-router need all routes to boot.
So with redux-little-router, I can do the same thing but I feel that maybe a replaceRoutes is possible.
What we could get is something like this :
You first pass a initial route object to redux-little-router with one (or more) route ending with * (like myapp/private/*).
Then in the render that match this route, we fetch a some new routes, compute a new routes object by replacing the * by some sub routes and then call store.replaceRoutes(newRoutes) that replace the route object internally and dispatch a route event.