michaelcontento / redux-storage

Persistence layer for redux with flexible backends
MIT License
675 stars 50 forks source link

State lost when browser refreshed more than once #162

Closed anandrikka closed 8 years ago

anandrikka commented 8 years ago

Hello,

This is how I'm using redux-storage in my store.js

`let reducer = storage.reducer(rootReducer); let engine = createEngine('my-save-key'); let engineMiddleware = storage.createMiddleware(engine);

let middleware = applyMiddleware(thunk, logger(), engineMiddleware);

let store = createStore(rootReducer, middleware);

let load = storage.createLoader(engine); load(store);`

I'm getting data from local storage for 1st time. However from 2nd time when I refresh browser data is lost and no more gets the state

michaelcontento commented 8 years ago

Sorry for the bad news but this package is no longer maintained. 😞

My focus has left the react / node ecosystem and I don't have to time to keep things up to date. But if you want to step in and become the new maintainer of redux-storage and all of it parts, just ping me! 😃

michaelcontento commented 8 years ago

Re-opened as @guns2410 want's to work on this project: Give him a warm welcome 👏

guns2410 commented 8 years ago

Thanks @michaelcontento

@anandrikka can you check if there are any errors loading the state.

load(store)
    .then((newState) => console.log('Loaded state:', newState))
    .catch((err) => console.log(err));
anandrikka commented 8 years ago

Thanks @michaelcontento for fixing it