Skip to content

matthewmueller/redux-routes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Simple redux history middleware.

Resources

Stars

Watchers

Forks

Packages

No packages published