Created
March 16, 2021 05:03
-
-
Save ajainarayanan/72d5d07dc5ae28d4f5483f867ceec754 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 fetchMachine = Machine({ | |
id: 'Program Control', | |
initial: 'STOPPED', | |
context: { | |
retries: 0, | |
}, | |
states: { | |
LOADING: { | |
on: { | |
RUN: 'RUNNING', | |
STOP: 'STOPPED', | |
FAIL: 'STOPPED', | |
} | |
}, | |
RUNNING: { | |
on: { | |
STOP: 'LOADING' | |
} | |
}, | |
STOPPED: { | |
on: { | |
START: 'LOADING' | |
} | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment