sekoyo/universal-react

State set in Routes.js is overwritten in Routes.js

Closed this issue · 0 comments

keyeh commented

If you set the Redux state in Routes.js (eg to check user auth onEnter), handleRoute() and handle404() Router.js both call configureStore() which resets the state back to initial.

Calling configureStore() in serverMiddleware() and passing the store tohandleRoute() and handle404() fixes this.

Fixed in PR #17