Created
June 5, 2021 13:22
-
-
Save jinnkhan88/05db4c1d5335267f6b446141cf95d02b 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 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