Integration: Vanilla JS
Integration: Vanilla JS
Use XState state machines without a framework — pure JavaScript for any environment.
Overview
XState works anywhere JavaScript runs. This guide covers using machines in vanilla JS contexts: plain HTML pages, Web Components, Node.js, or any non-framework environment.
Key Concepts
createMachineandinterpretManual subscription to state changes
DOM event bindings
Actor lifecycle management
Prerequisites
Related Pages
XState + React — React integration
Tooling: Testing — Testing machines
TODO
Add Web Component examples
Add service worker machine patterns
Add Node.js backend examples
Do you like what you are reading? Subscribe to receive updates.
Unsubscribe anytime
Powered by Seed HypermediaOpen App