Created
January 8, 2021 17:37
-
-
Save apnerve/081626be356a3c7a14ea0776e2a6a855 to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
This file contains hidden or 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 webSocketMachine = Machine({ | |
id: "Web Socket", | |
initial: "connecting", | |
states: { | |
connecting:{ | |
on: { | |
SUCCESS: "open", | |
ERROR: "closed" | |
} | |
}, | |
open: { | |
on: { | |
CLOSE: "closed", | |
ERROR: "closed" | |
} | |
}, | |
closed: { | |
on: { | |
CONNECT: "connecting" | |
} | |
} | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment