redux-persist-crosstab
redux-persist-crosstab copied to clipboard
Issue using with redux-persist on REHYDRATE action type.
I am using both redux-persist and redux-persist-crosstab and the reducers return the Initial State of the application when action type is REHYDRATE for handling the corrupt state.
const reducer1 = (state=INITIAL_STATE.reducer1, action) => {
case REHYDRATE:
return INITIAL_STATE;
default:
return state;
}
}
Now crosstab overlaps with it because even crosstab uses REHYDRATE action - So, whenever I open a new tab, the initial state is returned and not the updated state from other tabs.
persistor.rehydrate(statePartial, {serial: true})
What to do in such a case?