Created
April 29, 2021 08:30
-
-
Save vin-e/09bc348c28e6459baa17e7184cbb889c 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 windowMachine = Machine({ | |
id: 'window', | |
initial: 'open', | |
context: { | |
}, | |
states: { | |
open: { | |
initial: 'floating', | |
states: { | |
floating: { | |
on: { | |
MAXIMIZED: 'maximized' | |
} | |
}, | |
maximized: { | |
on: { | |
FLOATING: 'floating' | |
} | |
} | |
}, | |
on: { | |
MINIMIZED: '#window.minimized' | |
} | |
}, | |
minimized: { | |
on: { | |
OPEN: 'open' | |
} | |
} | |
} | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment