Open fernando-tiburcio opened 2 years ago
@fernando-tiburcio any workaround?
@fernando-tiburcio any workaround?
Yes, I fixed this using a new migration and incrementing the version of the persisted state, this solve my problem... code below.
const rootMigrations = {
3: (state) => ({
...state,
mirror: {
...state.mirror,
currentRecommendationEvidence: [],
},
})
};
const persistConfigSecondLevel = migrations => ({
blacklist: ['offline', 'auth'],
debug: !releaseChannel,
key: 'root',
migrate: createMigrate(migrations, { debug: !releaseChannel }),
storage: AsyncStorage,
timeout: 0,
version: 3,
whitelist: ['mirror', 'local', 'notifications'],
});
Hi Guys, why when I add a new property on my Redux INITIAL_STATE, this new property is just droped on REHYDRATE step of Redux Persist instead of being merged with local state?
I already tried to configure the modes autoMergeLevel1 and autoMergeLevel2 in the stateReconciler of the persistReducer config but without success.
Here is my store.js
My reducer :
And my configPersist :