react-router-redux-sync

1.0.3 • Public • Published

react-router-redux-sync

Sync params and location from react-router to a redux store.

Usage

Higher order component

import { SyncRouting } from 'react-router-redux-sync';
import { Router, Route, browserHistory } from 'react-router'
import { Provider } from 'react-redux';
import App from './App';
 
render(
  <Provider store={store}>
    <Router history={browserHistory}>
      <Route path="/" component={SyncRouting(App)}>
         ...
      </Route>
    </Router>
  </Provider>,
  document.body
);
 

Reducers

import { locationReducer, paramsReducer } from 'react-router-redux-sync';

Package Sidebar

Install

npm i react-router-redux-sync

Weekly Downloads

13

Version

1.0.3

License

Apache-2.0

Last publish

Collaborators

  • scienceai