rt2zz / redux-persist

persist and rehydrate a redux store
MIT License
12.97k stars 867 forks source link

Import of persistor causes Cycle Dependency Error #1199

Open papuruth opened 4 years ago

papuruth commented 4 years ago

I have tried importing the persistor in rootReducer, rootSaga, or in my independent reducer or in sagas they all causing dependency cycle error by eslint. Any suggestion would be appreciated as I'm trying to purge the state when logout action is fired.

juanfrancomartin commented 1 year ago

Hi, i know is an old issue but i had the same problem and maybe can help somebody. I solved it returning the initialState in the reducer on logout, instead of purge the store. Credits: https://stackoverflow.com/a/47997506