What is difference between react-router 4.0, react-router-dom and react-router-redux?

react-router v4 is base, building block. Provides API for creating routing solution.

react-router-dom is wrapper around react-router. It is supposed to be run in browser.

react-router-redux offers so called "controlled router", bound to redux store. State changes (navigation) could be controlled by dispatching redux actions as well as by clicking on links.

Your best bet is to start with react-router-dom (which pulls in react-router for you by default).


Very very simple explanation!!!

  1. No need to use react-router directly.
  2. react-router-dom is made for "Web application" and react-router-native is made for "react native mobile apps".
  3. react-router-dom & react-router-native uses react-router at core.
  4. react-router-dom works perfectly fine with Redux, NO NEED of react-router-redux. (confirmed by Dan abramov - creator of Redux)
  5. Extra Benefit of react-router-redux is you can keep your router in sync with application state.
  6. In nutshell - history + store (redux) → react-router-redux

  • react-router exports shared, core modules for native (react-router-native) and web development (react-router-dom)
  • Use react-router-dom for web development
  • Use react-router-native for native development
  • Use react-router-redux to integrate react-redux and react-router in order to, for instance, navigate via store.dispatch()