Last active
September 14, 2022 01:50
-
-
Save k-sav/d25aaa9f7c7483c0c5a74b0f2bfc89b9 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 fetchMachine2 = Machine({ | |
id: 'fetch2', | |
initial: 'closed', | |
context: { | |
retries: 0 | |
}, | |
states: { | |
closed: { | |
on: { | |
OPEN: 'opened' | |
} | |
}, | |
opened: { | |
on: { | |
CLOSE: 'closed' | |
}, | |
initial: 'page1', | |
states: { | |
page1: { | |
on: { | |
NEXT: 'page2' | |
} | |
}, | |
page2: { | |
on: { | |
BACK: 'page1', | |
NEXT: 'page3' | |
} | |
}, | |
page3: { | |
on: { | |
BACK: 'page2', | |
DONE: '#fetch2.closed' | |
} | |
} | |
} | |
} | |
} | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment