Last active
December 25, 2019 17:54
-
-
Save eugenekgn/ec38ff51642dd4880b4fc499c86cc1be to your computer and use it in GitHub Desktop.
Revisions
-
eugenekgn revised this gist
Dec 25, 2019 . 1 changed file with 4 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -16,8 +16,10 @@ states: { lit: { on: { BREAK: { target: 'broken', actions: ['logBroken'] } } }, unlit: { -
eugenekgn revised this gist
Dec 25, 2019 . No changes.There are no files selected for viewing
-
eugenekgn revised this gist
Dec 25, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -36,7 +36,7 @@ }, { actions:{ logBroken: (context, event)=>{ console.log(`yo, I am broke ${event.location}`) } } }); -
eugenekgn revised this gist
Dec 25, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -35,7 +35,7 @@ }, { actions:{ logBroken: (context, event)=>{ console.log('yo, I am broke') } } -
eugenekgn revised this gist
Dec 25, 2019 . No changes.There are no files selected for viewing
-
eugenekgn revised this gist
Dec 25, 2019 . No changes.There are no files selected for viewing
-
eugenekgn revised this gist
Dec 25, 2019 . No changes.There are no files selected for viewing
-
eugenekgn revised this gist
Dec 25, 2019 . 1 changed file with 7 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -24,9 +24,7 @@ on: { BREAK: { target: 'broken', actions: ['logBroken'] } } }, @@ -35,6 +33,12 @@ } }, }, { actions:{ logBroken: ()=>{ console.log('yo, I am broke') } } }); -
eugenekgn revised this gist
Dec 25, 2019 . 1 changed file with 9 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -22,11 +22,17 @@ }, unlit: { on: { BREAK: { target: 'broken', actions: [(context, event)=>{ console.log(context, event) }] } } }, broken: { } }, }); -
eugenekgn revised this gist
Dec 25, 2019 . No changes.There are no files selected for viewing
-
eugenekgn revised this gist
Dec 25, 2019 . 1 changed file with 3 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -25,9 +25,10 @@ BREAK: 'broken', TOGGLE: 'lit' } }, broken: {} }, }); -
eugenekgn revised this gist
Dec 25, 2019 . 1 changed file with 3 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -15,7 +15,7 @@ initial: 'unlit', states: { lit: { on: { BREAK: 'broken', TOGGLE: 'unlit' } @@ -29,4 +29,5 @@ }, broken: {} }); -
eugenekgn revised this gist
Dec 25, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -10,7 +10,7 @@ // - actions // - XState (all XState exports) const fetchMachine = Machine({ id: 'lightBult', initial: 'unlit', states: { -
eugenekgn revised this gist
Dec 25, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -10,7 +10,7 @@ // - actions // - XState (all XState exports) const lightBulbMachine = Machine({ id: 'lightBult', initial: 'unlit', states: { -
eugenekgn revised this gist
Dec 25, 2019 . No changes.There are no files selected for viewing
-
eugenekgn revised this gist
Dec 25, 2019 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -26,6 +26,7 @@ TOGGLE: 'lit' } } }, broken: {} });
-
eugenekgn revised this gist
Dec 25, 2019 . No changes.There are no files selected for viewing
-
eugenekgn created this gist
Dec 25, 2019 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,31 @@ // Available variables: // - Machine // - interpret // - assign // - send // - sendParent // - spawn // - raise // - actions // - XState (all XState exports) const fetchMachine = Machine({ id: 'lightBult', initial: 'unlit', states: { lit: { on:{ BREAK: 'broken', TOGGLE: 'unlit' } }, unlit: { on: { BREAK: 'broken', TOGGLE: 'lit' } } } });