diff --git a/template/src/redux/slices/exampleSlice.ts b/template/src/redux/slices/exampleSlice.ts index 4804afe..073d200 100644 --- a/template/src/redux/slices/exampleSlice.ts +++ b/template/src/redux/slices/exampleSlice.ts @@ -17,8 +17,8 @@ const exampleSlice = createSlice({ name: "example", initialState, reducers: { - ping: (state) => ({ ...state, globalValue: 'PING' }), - pong: (state) => ({ ...state, globalValue: 'PONG' }), + ping: (state) => { state.globalValue = 'PING' }, + pong: (state) => { state.globalValue = 'PONG' }, }, })