Created
July 4, 2024 12:41
-
-
Save SandroMaglione/bbe1a6878f5fd92d6b87b59911c8550c to your computer and use it in GitHub Desktop.
Revisions
-
SandroMaglione created this gist
Jul 4, 2024 .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,17 @@ { "state machine": { "prefix": "machine", "description": "Create scaffold for state machine", "body": [ "import { setup } from \"xstate\";", "", "export const machine = setup({}).createMachine({", " id: \"$0\",", " initial: \"Idle\",", " states: {", " Idle: {},", " },", "});", ] }, }