Skip to content

Instantly share code, notes, and snippets.

@pkellner
Last active January 25, 2021 23:57
Show Gist options
  • Save pkellner/ff3ecddd8a54013ff211d33f19a8185d to your computer and use it in GitHub Desktop.
Save pkellner/ff3ecddd8a54013ff211d33f19a8185d to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
const svccUiMachine1 = Machine({
id: 'svccUiMachine1',
context: {
},
type: 'parallel',
states: {
codeCampYear: {
initial: "2019",
states: {
"2006": {},
"2017": {},
"2018": {},
"2019": {}
}
},
authenticationStatus: {
initial: 'notAuthenticated',
states: {
notAuthenticated: {
on: { loggedIn: 'authenticated' },
},
authenticated: {
initial: 'hidingFavorites',
on: { loggingOut: 'notAuthenticated' },
states: {
showingFavorites: {
on: {
hideFavorites: 'hidingFavorites',
},
},
hidingFavorites: {
on: {
showFavorites: 'showingFavorites',
},
},
},
},
},
},
sessionsDisplayStatus: {
initial: 'hidingSessions',
states: {
showingSessions: {
on: {
hideSessions: 'hidingSessions',
},
},
hidingSessions: {
on: {
showSessions: 'showingSessions',
},
},
},
},
theme: {
initial: 'light',
states: {
light: {
on: {
setDarkTheme: 'dark',
},
},
dark: {
on: {
setLightTheme: 'light',
},
},
},
},
},
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment