microsoft / Mezzurite

Your components, timed.
Other
61 stars 10 forks source link

Handle invalid state transitions - onComponentEnd #67

Closed cn894 closed 5 years ago

cn894 commented 5 years ago

This set of changes ensures that the COMPONENT_END action is not dispatched when the store does not contain an entry for the component id present in the event or when COMPONENT_END has already been called previously for the component id. Further, the event handler will issue a warning via console.warn() to aid developers in debugging these failed state transitions.

The corresponding unit test suite has been updated to enforce this specification.

Addresses part of #54.