终极版-persist的复位超时后持续店(Redux-persist reset persisted

2019-10-29 13:13发布

我知道,到终极版,一直存在加一些超时后重置我坚持商店的能力: https://github.com/rt2zz/redux-persist/pull/713
不幸的是,我可以“T实现它......当我要补充这个超时?

我曾尝试水木清华这样的:

const persistor = persistStore(store, { timeout: 10000 }, () => {
  persistor.purge();
});

和这个:

const persistConfig = {
  key: 'order',
  storage: localStorage,
  timeout: 6000, ///!!!
  whitelist: ['orderReducer'],
  blackList: ['advantagesReducer']
};
const persistedReducer = persistReducer(persistConfig, rootReducer);

没有什么作品?

文章来源: Redux-persist reset persisted store after timeout