XState VSCode enhances the XState development experience by providing VSCode users with features like visual editing, autocomplete, typegen and linting. Quickstart
FeaturesVisually edit machinesEdit any XState machine with drag-and-drop using the Stately Visual editor. AutocompleteIntelligent suggestions for transition targets and initial states. LintingHighlights errors and potential bugs in your XState machine definitions. Jump to definitionNavigate around machines easily with jump to definition on targets, actions, guards, services and more. Snippets (BETA)As an experimental feature, we include a snippet with this extension, You will get an untyped machine if you type
https://user-images.githubusercontent.com/167574/171016896-455d7772-cbbd-4b4c-8d77-f96f98383e03.mp4 In a
https://user-images.githubusercontent.com/167574/171017059-d997a158-c307-4c95-8f66-46210835a56a.mp4 In Hints and TipsIgnoring machinesIf you'd like to ignore linting/autocomplete on a machine, add a
Nesting typegen filesIf you're using typegen, you can nest the files in VSCode. We try to detect if you want to have your typegen files nested. This is set to If you choose to enable file nesting using the prompt, we will set the file nesting feature in VSCode to If you choose not to enable it, we will set You can read about this in more detail in our blog post: Nesting XState typegen files. RefactorsClick the lightbulb when hovering an named action, guard or service in a machine to see available refactors. |