Closed avocadowastaken closed 8 years ago
Async routes are really out of scope of this library. It's main function is for syncing up when using Dev Tools. But you should let Router manage its state in production.
Dan posted a good writeup on SO today on how you should keep app state and location/router state separate: http://stackoverflow.com/questions/36722584/how-to-sync-redux-state-and-url-hash-tag-params/36749963#36749963
Greeting, thanks for great lib that helps me a lot to integrate exist project with
redux
. But as project grows - new challenges comes.So,
react-router
has API to lazy-load routes, which is great andreact-router-redux
has no problem with it. Implementation was easy, but as I wanted to track loading process of Lazy Components, I faced the problem.After few minutes I found solution:
As you see implementation is pretty easy and
react-router
will take care of all asynchronous problems.So what features it can give:
state.routing.route.isLoading
state.routing.route.params
What problems it can create:
SUCCESS
action - need to check forprops
changes beforedispatch
ing actionEDIT:
Here logs screenshot of initial loading