redux-router-preload
Universal preloading for redux-router
Installing
npm install --save redux-router-preload
Integration
Reducer:
router: routerStateReducer preload: reducer
Components:
@ { const loading = thisprops ... }
Server:
... const store = createStorereducerconst query = qsconst url = `` store
Example
You can look for a working example here
Test
npm test
How does it work?
The key concept of the redux-router is to store information about current location in the redux`s store. So when transitions perform store is updated by actions.
This module adds information in the store when preloading was executed on the server and prevent loading on the client.
But after first changing of the location client loading is available again.
License
MIT