Immer library recommends the use of code block to insure consistency across large code-base your reducer should be like this (use code block) rootReducer: (state, action) => { state.id = action.payload.id }