Created
May 28, 2020 02:20
-
-
Save Damimd10/745ae5a49ba70db5ec22be5270f8d71f to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const firstStep = { | |
initial: 'BREAK_UP', | |
states: { | |
BREAK_UP: { | |
on: { | |
START: 'START_PROPELLERS' | |
} | |
}, | |
START_PROPELLERS: { | |
on: { | |
TURN: 'START_ENGINES' | |
} | |
}, | |
START_ENGINES: { | |
on: { | |
SPREAD_WINGS: 'LAND' | |
} | |
}, | |
LAND: { | |
type: 'final' | |
} | |
} | |
}; | |
const spaceMachine = Machine({ | |
id: "crewDragon", | |
initial: "active", | |
states: { | |
active: { | |
on: { | |
LAUNCH: "FIRST_MODULE" | |
} | |
}, | |
FIRST_MODULE: { | |
on: { | |
TRANSPORT: "COUPLING" | |
}, | |
...firstStep, | |
}, | |
COUPLING: { | |
type: "final" | |
} | |
} | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment