Skip to content

Instantly share code, notes, and snippets.

@hackape
Last active March 18, 2021 07:01
Show Gist options
  • Save hackape/a115c97bc3cdee030424683c3149b8a7 to your computer and use it in GitHub Desktop.
Save hackape/a115c97bc3cdee030424683c3149b8a7 to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
const websocketMachine = Machine({
initial: '@closed',
states: {
'@closed': {},
'@connecting': {},
'@closing': {},
'@reconnecting': {},
'@connected': {},
'@disconnected': {},
},
on: {
CONNECT: '@connecting',
},
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment