sekoyo / universal-react

A universal react starter, with routing, meta, title, and data features
242 stars 50 forks source link

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

Closed keyeh closed 8 years ago

keyeh commented 8 years ago

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