问题
I know, that to redux-persist was added an ability to reset my persisted store after some timeout: https://github.com/rt2zz/redux-persist/pull/713
Unfortunately, I can"t implement it... Where I should add this timeout?
I have tried smth like this:
const persistor = persistStore(store, { timeout: 10000 }, () => {
persistor.purge();
});
And this:
const persistConfig = {
key: 'order',
storage: localStorage,
timeout: 6000, ///!!!
whitelist: ['orderReducer'],
blackList: ['advantagesReducer']
};
const persistedReducer = persistReducer(persistConfig, rootReducer);
Nothing works...
来源:https://stackoverflow.com/questions/56871364/redux-persist-reset-persisted-store-after-timeout