Using this with redux-persist in version 5.9.1 results in thrown error-message:
redux-persist: invalid option passed to persistStore: "transforms". You may be incorrectly passing persistConfig into persistStore, whereas it should be passed into persistReducer.
Please update usage-example to something like this:
// "loading"-attribute should not be loaded from store
const loadPartialLoginFilter = createFilter(
'login',
null,
['loading'],
'blacklist'
);
// prepare persist configuration
const persistConfig = {
key: 'root',
storage,
whitelist: ['settings', 'login'],
transforms: [
loadPartialLoginFilter
]
};
const persistedReducer = persistReducer(persistConfig, reducers);
const store = createStore(
persistedReducer,
{},
composeEnhancers(applyMiddleware(ReduxThunk, createLogicMiddleware(logics, deps)))
);
// "transforms" is not applied here
export const persistor = persistStore(store);
Current documentation inside
README.md
contains the following example code:Using this with
redux-persist
in version5.9.1
results in thrown error-message:redux-persist: invalid option passed to persistStore: "transforms". You may be incorrectly passing persistConfig into persistStore, whereas it should be passed into persistReducer.
Please update usage-example to something like this: