Skip to content

Typo in action constant name #6

@pcavanaugh

Description

@pcavanaugh

Hello!

The constant used to select a variant is inconsistent. It ends up working out since we're emitting an undefined event type and checking for an undefined event type, but it's a bit confusing.

// FluxCartConstants.js
module.exports = keyMirror({
  CART_ADD: null,
  CART_REMOVE: null,
  CART_VISIBLE: null,
  SET_SELECTED: null,
  RECEIVE_DATA: null
});
  // FluxCartActions.js
  // Set currently selected product variation
  selectProduct: function(index) {
    AppDispatcher.handleAction({
      actionType: FluxCartConstants.SELECT_PRODUCT,
      data: index
    })
  }
// ProductStore.js
// Respond to SELECT_PRODUCT action
    case FluxCartConstants.SELECT_PRODUCT:
      setSelected(action.data);
      break;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions