Created
December 9, 2020 19:41
-
-
Save csenio/1ceac3075c1fd2280c1b694f57188671 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 canvasMachine = Machine({ | |
id: 'canvas', | |
initial: 'idle', | |
context: { | |
elements: [], | |
targetEl: null, | |
}, | |
states: { | |
idle: { | |
on: { | |
select: 'loading' | |
} | |
}, | |
loading: { | |
on: { | |
RESOLVE: 'success', | |
REJECT: 'failure' | |
} | |
}, | |
} | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment