You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
console.error: "redux-persist: invalid option passed to persistStore: "transforms". You may be incorrectly passing persistConfig into persistStore, whereas it should be passed into persistReducer."
my code:
`import { createStore } from 'redux';
import { persistStore, persistReducer } from 'redux-persist';
// import { AsyncStorage } from 'react-native';
import storage from 'redux-persist/lib/storage'; // defaults to localStorage for web and AsyncStorage for react-native
import immutableTransform from 'redux-persist-transform-immutable';
import rootReducer from '../reducers/index';
import { Record } from 'immutable';
console.error: "redux-persist: invalid option passed to persistStore: "transforms". You may be incorrectly passing persistConfig into persistStore, whereas it should be passed into persistReducer."
my code:
`import { createStore } from 'redux';
import { persistStore, persistReducer } from 'redux-persist';
// import { AsyncStorage } from 'react-native';
import storage from 'redux-persist/lib/storage'; // defaults to localStorage for web and AsyncStorage for react-native
import immutableTransform from 'redux-persist-transform-immutable';
import rootReducer from '../reducers/index';
import { Record } from 'immutable';
const persistConfig = {
transforms: [immutableTransform()],
key: 'root',
storage,
blacklist: ['navigation'],
};
const persistedReducer = persistReducer(persistConfig, rootReducer);
const recordUserCenter = Record({
uid: 0,
email: '',
username: '',
password: '',
error: '',
token: '',
}, 'userCenter');
export default () => {
let store = createStore(persistedReducer);
let persistor = persistStore(store, {
transforms: [immutableTransform({
records: [recordUserCenter],
whitelist: ['friends'],
})]
});
return { store, persistor }
}`
The text was updated successfully, but these errors were encountered: