Last active
April 23, 2020 21:05
-
-
Save sawyerh/494db818bfc9e2010181c22275757e10 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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions | |
// - XState (all XState exports) | |
const fetchMachine = Machine({ "id": "root", "states": { "Requests": { "id": "Requests", "states": {}, "on": { "Submit full form": "#All required fields are present", "Submit in-progress claim": "#Request is missing required fields" } }, "Validation scenarios": { "id": "Validation scenarios", "states": { "All required fields are present": { "id": "All required fields are present", "states": {}, "on": { "All data is valid": "#200 with no warnings", "Some data is invalid": "#400 with errors" } }, "Request is missing required fields": { "id": "Request is missing required fields", "states": {}, "on": { "Present data is invalid": "#400 with errors and warnings", "Present data is valid": "#200 with warnings" } } }, "initial": "All required fields are present", "on": {} }, "Responses": { "id": "Responses", "states": { "200": { "id": "200", "states": { "200 with no warnings": { "id": "200 with no warnings", "states": {} }, "200 with warnings": { "id": "200 with warnings", "states": {} } }, "initial": "200 with no warnings", "on": {} }, "400": { "id": "400", "states": { "400 with errors": { "id": "400 with errors", "states": {} }, "400 with errors and warnings": { "id": "400 with errors and warnings", "states": {} } }, "initial": "400 with errors", "on": {} } }, "initial": "200", "on": {} } }, "initial": "Requests", "on": {}}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment