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

Gorakh Nath picture Gorakh Nath · Apr 3, 2017 · Viewed 14.4k times · Source

I am implementing routing in react-application. I am confused between the advantage of react-router 4.0 over react-router-redux. I am also confused by react-router-dom.

What are the advantages and disadvantages of react-router-redux, react-router 4.0 and react-router-dom over each other?

Answer

Andreyco picture Andreyco · Apr 3, 2017

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).