redux-routes

Simple redux history middleware.

Downloads
16
Stars
13
Committers
1

redux-routes

Simple redux history middleware.

Doesn't provide a reducer because reducers are application-specific. You'll want to save the payload (the action.payload.url) somewhere in your store so you can use it for routing.

There's nothing new here, @callum did all the work in redux-routing. This module just pulls out the History API and the middleware from that module.

Install

npm install redux-routes

Example

var History = require('redux-routes')
var Socrates = require('socrates')
var navigate = History.navigate

var store = Socrates([
  History()
])

store.dispatch(navigate('/blog'))

License

MIT

Package Rankings
Top 17.96% on Npmjs.org