Jobsity / lia

1 stars 0 forks source link

Data of played events can be easily used by any reducer #71

Closed hdt94 closed 5 years ago

hdt94 commented 5 years ago

Note: there is a commit ahead of current PR that should have been added. Please check it and merge it.

Data of played events is now classified based on events types when played events are assigned. Thus, any reducer can just listen PLAYBACK_EVENTS_SET action type, and extract its corresponding event data from eventsData payload property.

Example:

case actionTypes.PLAYBACK_EVENTS_SET:
  return {
    ..state,
    changes: action.payload.eventsData.editor || [],
  };