Much of the editor depends on where the current project is in its lifecycle: fetching, loading into the VM, showing, or saving. src/reducers/project-state.js models that lifecycle as a finite state machine so the current phase is always explicit.
LoadingState in src/reducers/project-state.js lists every state, for example:
NOT_LOADED, the default stateERRORFETCHING_WITH_IDLOADING_VM_WITH_IDREMIXINGSHOWING_WITH_IDSHOWING_WITHOUT_IDTransitions are the Redux actions that move the project from one state to another, for example:
START_FETCHING_NEWDONE_FETCHING_WITH_IDDONE_LOADING_VM_WITH_IDSET_PROJECT_IDSTART_AUTO_UPDATINGThe diagram shows how transitions connect the loading states. It leaves out error handling for clarity.
When the editor opens a project by id, such as /editor#123456:

NOT_LOADED.src/lib/components/project-fetcher-hoc.jsx dispatches SET_PROJECT_ID with projectId set to 123456. The state becomes FETCHING_WITH_ID.FETCHING_WITH_ID, the fetcher requests the project data.DONE_FETCHING_WITH_ID with projectData. The state becomes LOADING_VM_WITH_ID.LOADING_VM_WITH_ID, src/lib/components/vm-manager-hoc.jsx loads projectData into the VM.DONE_LOADING_VM_WITH_ID. The state becomes SHOWING_WITH_ID.SHOWING_WITH_ID the project is playable and editable.