XState tools for Vue
npm install @xstate/vueThis package contains utilities for using XState with Vue.
- Read the full documentation in the XState docs.
- Read our contribution guidelines.
If you're using Vue 2.x, please see the Vue recipe instead, or use the xstate-vue2 package if you want to use the Vue Composition API.
1. Install xstate and @xstate/vue:
``bash`
npm i xstate @xstate/vue
Via CDN
`html`
By using the global variable XStateVue
2. Import the useMachine composition function:
`vue
``