If you use React to render your static site and browser app, you’ll need routing to work in both places. With a little setup, you’re golden.
React Router v4 has a new API that’s pretty cool. The method for accessing the route params is different, and it’s very straightforward.
Once upon a time, react-router transferred params and query params from the url via props into components. It doesn’t happen this way any more. So, let’s say you have a need in your component like overriding
shouldComponentUpdate in your component which only has access to
this.state. How can you use the url data to affect the component re-render or not?
react-router provides great route handling with route params and query params. Flux provides a pattern for building React apps, including a pattern from providing data to your components. Here’s a straightforward way to make route changes trigger data changes in your components.