-
Notifications
You must be signed in to change notification settings - Fork 131
Open
Description
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;Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels