score:1

Accepted answer
const inventoryRedcer = (state = inventoryDefaultState, action) => {
    switch (action.type) {
        case 'PICK_UP_ITEM':
            return {
                ...state,
                items: {
                    ...state.items,
                    [action.payload.itemName]: action.payload.IsPickedUp
                }
            }
        default:
            return state;
    }
}

Related Query

More Query from same tag