xouabita / redux-staythere

Ask your store to stay there, in localStorage.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

redux-staythere

Ask your store to stay there, in localStorage.

Installation

First you need to install: npm i -S redux-staythere or npm install --save redux-staythere

Then, you need to compose:

# In your project, where you init your store
store = stayThere()(createStore) reducer
# ~ or ~
store = compose(applyMiddleware(thunk), stayThere('debug42'))(reducer)

And you are all done 😄

You can also check the demo. Don't forget to reload, to see the magic. 🎩

About

Ask your store to stay there, in localStorage.


Languages

Language:CoffeeScript 96.2%Language:HTML 3.8%