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.
npm install redux-routes
var History = require('redux-routes')
var Socrates = require('socrates')
var navigate = History.navigate
var store = Socrates([
History()
])
store.dispatch(navigate('/blog'))
MIT