artboost / router5-react-redux

router5 example usage, in an isomorphic React app, with Redux.
MIT License
11 stars 2 forks source link
async-data isomorphic-react react react-router5 redux router router5

router5-react-redux

Bootstrapped using Universal Create React App

Purpose

Demonstrate router5 in an isomorphic React app, with Redux.

We are new to router5, and if you have any feedback, we would greatly appreciate it!

Key router5-related features

Gotchas

One thing, regarding async data: Because the data is applied to the route object, it will be lost when the route changes in any way. This means, if you navigate between children, the parent - although it still requires the data - will lose the data from props. To handle this, you can either add the data to the state, and handle updates to it via componentWillReceiveProps, or you can use the HOC withData, which handles it for you.