redux-persist-crosstab icon indicating copy to clipboard operation
redux-persist-crosstab copied to clipboard

Issue using with redux-persist on REHYDRATE action type.

Open yugantar7 opened this issue 7 years ago • 0 comments

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?

yugantar7 avatar Dec 12 '18 10:12 yugantar7