I'm using redux-starter-kit (which includes Immer library for mutable updates) and for some reason this reducer doesn't work:
reInitializeState(state, action) {
state = Object.assign({}, initialState);
state.someProperty = true; // this does not get set
},
But this one does:
reInitializeState(state, action) {
Object.assign(state, initialState);
state.someProperty = true; // this does
},
I would expect them to do the same thing. What is going on here?