Last active
February 25, 2020 06:40
-
-
Save zettadam/2ec7ad6acf0f5ae658f03c4eef4a86a2 to your computer and use it in GitHub Desktop.
Revisions
-
zettadam revised this gist
Feb 25, 2020 . 1 changed file with 8 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 @@ -26,15 +26,20 @@ }, submitted: { on: { RESOLVE: 'pending', REJECT: 'rejected', CANCEL: 'withdrawn' } }, pending: { on: { RESOLVE: 'processed' } }, processed: { on: { PUBLISH: 'published', RESUBMIT: 'submitted', WITHDRAW: 'withdrawn' } }, @@ -45,7 +50,7 @@ }, withdrawn: { on: { RESUBMIT: 'submitted', DELETE: 'deleted' } }, -
zettadam revised this gist
Feb 25, 2020 . 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 @@ -11,7 +11,7 @@ // - XState (all XState exports) const fetchMachine = Machine({ id: 'flight-assignment-status', initial: 'idle', states: { idle: { -
zettadam revised this gist
Feb 25, 2020 . No changes.There are no files selected for viewing
-
zettadam revised this gist
Feb 25, 2020 . No changes.There are no files selected for viewing
-
zettadam revised this gist
Feb 25, 2020 . 1 changed file with 2 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 @@ -28,7 +28,7 @@ on: { RESOLVE: 'processed', REJECT: 'rejected', CANCEL: 'withdrawn' } }, processed: { @@ -45,7 +45,7 @@ }, withdrawn: { on: { SUBMIT: 'submitted', DELETE: 'deleted' } }, -
zettadam created this gist
Feb 25, 2020 .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,60 @@ // Available variables: // - Machine // - interpret // - assign // - send // - sendParent // - spawn // - raise // - actions // - XState (all XState exports) const fetchMachine = Machine({ id: 'schedule-status', initial: 'idle', states: { idle: { on: { CREATE: 'created' } }, created: { on: { SUBMIT: 'submitted' } }, submitted: { on: { RESOLVE: 'processed', REJECT: 'rejected', WITHDRAW: 'withdrawn' } }, processed: { on: { PUBLISH: 'published', SUBMIT: 'submitted', WITHDRAW: 'withdrawn' } }, rejected: { on: { SUBMIT: 'submitted' } }, withdrawn: { on: { CREATE: 'created', DELETE: 'deleted' } }, deleted: { type: 'final' }, published: { type: 'final' } } });