function products(state, action) {
  switch (action.type) {
    case ADD_TO_CART:
      return {
        ...state,
        inventory: state.inventory - 1,
      };
    case REMOVE_FROM_CART:
      return {
        ...state,
        inventory: state.inventory + 1,
      };
    default:
      return state;
  }
}
product reducers.
@param state
@param action
@returns {*}