Open
Description
The project state machine currently serves to trigger events in various components in a roundabout way.
The components must check if a given project state has become the current project state, in their componentDidUpdate()
functions.
An alternative approach would be to use an explicit pub-sub model; have components directly subscribe to actions which correspond to project state machine transitions.
One library we could use is https://github.com/mroderick/PubSubJS (this is the most-used js pubsub library, according to npm trends).
Sample usage: https://gist.github.com/pablen/63b57ee80877712ad00ca7849643b4a2