Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typo in action constant name #6

Open
pcavanaugh opened this issue Jul 17, 2015 · 2 comments
Open

Typo in action constant name #6

pcavanaugh opened this issue Jul 17, 2015 · 2 comments

Comments

@pcavanaugh
Copy link

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;
@ORESoftware
Copy link

this should be fixed?

@ORESoftware
Copy link

I have this problem, and I think it's related to this open issue: http://stackoverflow.com/questions/32217986/error-in-react-lib-typeerror-type-is-undefined

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants