Skip to content

Instantly share code, notes, and snippets.

@jinnkhan88
Created June 5, 2021 13:22
Show Gist options
  • Save jinnkhan88/05db4c1d5335267f6b446141cf95d02b to your computer and use it in GitHub Desktop.
Save jinnkhan88/05db4c1d5335267f6b446141cf95d02b to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
const spaceHeader = Machine({
id:'spaceHeader',
initial:'poweredOff',
states:{
poweredOff:{
on:{
TOOGLE_POWER:'poweredOn'
}
},
poweredOn:{
on:{
TOOGLE_POWER:'poweredOff',
},
type:'parallel',
initial:'lowHeat',
states:{
heated:{
initial:'lowHeat',
states:{
lowHeat:{
on:{
TOOGLE_HEAT:'highHeat'
}
},
highHeat:{
on:{
TOOGLE_HEAT:'lowHeat'
}
}
}
},
occillation:{
initial:'disabled',
states:{
enabled:{
on:{
TOOGLE_OSC:'disabled'
}
},
disabled:{
on:{
TOOGLE_OSC:'enabled'
}
}
}
},
}
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment