Javascript – Usage of payload/action in React-redux reducers
I am currently trying to work through some example code and have the following in two separate slices: Reducer in slice 1: incrementQuantity: (state, action) => { const { payload: index } = action; if (state[index]) { if (state[index].name ===…