Beginner redux, if the new state is the same as the existing state, the new state, will not be added.

use redux

case "BEGIN_TO_LOGIN": {
            let cartState = {
                ...state,
                userInformation: [...state.userInformation, action.payload]
            }

beginner redux, if the new state is the same as the existing state, it will not add a new state, to judge how to write

Apr.11,2021

take a look at the example of immer

Menu