simple-react-router-redux
Redux bindings for react-router. A tiny fork of connected-react-router
Setup
npm install simple-react-router-redux
Usage
Setup your own history module:
; ;
And configure the store:
;; ;; // Combine your reducers with connectRouter.const reducers = ; const store = ;
Now just wrap your routes with ConnectedRouter with the same history module
import React from 'react';import ReactDOM from 'react-dom';import Provider from 'react-redux';import Route Switch from 'react-router';import ConnectedRouter from 'simple-react-router-redux'; import history from './history';import store from './store'; ReactDOM;
Enjoy!