Skip to content

Commit

Permalink
Merge pull request #2207 from davidkpiano/davidkpiano/docs-vue2
Browse files Browse the repository at this point in the history
[docs] Add links to xstate-vue2
  • Loading branch information
davidkpiano committed May 17, 2021
2 parents f4aeccc + 8045838 commit 560618f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docs/packages/xstate-vue/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

::: warning Vue 2 Notice:
If you're using Vue 2.x, please see [the Vue recipe](../../recipes/vue.html) instead, or use the [`xstate-vue2` package](https://github.com/ChrisShank/xstate-vue2) if you want to use the Vue Composition API.
:::

## Quick Start

1. Install `xstate` and `@xstate/vue`:
Expand Down Expand Up @@ -83,8 +87,6 @@ export default {
</script>
```

**Vue 2.x notice:** If you're using Vue 2.x, please see [the recipe](https://xstate.js.org/docs/recipes/vue.html) instead.

## API

### `useMachine(machine, options?)`
Expand Down
8 changes: 8 additions & 0 deletions docs/recipes/vue.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Usage with Vue

::: tip
If you want to use the Vue Composition API, we recommend using the following packages:

- [`@xstate/vue` package](../packages/xstate-vue) for Vue 3
- [`xstate-vue2` package](https://github.com/ChrisShank/xstate-vue2) (3rd-party) for Vue 2

:::

Vue follows a similar pattern to [React](./react.md):

- The machine can be defined externally;
Expand Down

0 comments on commit 560618f

Please sign in to comment.