Skip to content

Commit

Permalink
Composition api is available in Vue 2.7 (#808)
Browse files Browse the repository at this point in the history
  • Loading branch information
jay-es committed Aug 23, 2022
1 parent 3715f36 commit 764a91e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/guide/extras/composition-api-faq.md
Expand Up @@ -18,7 +18,7 @@ Composition API はオプションを宣言する代わりに関数をインポ

- [Dependency Injection](/api/composition-api-dependency-injection.html) 、すなわち `provide()``inject()` によって、 リアクティビティ API を使用しながら Vue の依存性注入システムを利用できます。

Composition API は Vue 3 に組み込まれていて、現在は Vue 2 においても公式のプラグイン [`@vue/composition-api`](https://github.com/vuejs/composition-api) で使うことができます。 Vue 3 においては、 単一ファイルコンポーネント内で [`<script setup>`](/api/sfc-script-setup.html) 構文を書くことで使えます。以下は Composition API を使った簡単なコンポーネントの例です。
Composition API は Vue 3 [Vue 2.7](https://blog.vuejs.org/posts/vue-2-7-naruto.html) の組み込み機能です。Vue 2 の古いバージョンでは、公式にメンテナンスされている[`@vue/composition-api`](https://github.com/vuejs/composition-api)プラグインを使用してください。Vue 3 においては、 単一ファイルコンポーネント内で [`<script setup>`](/api/sfc-script-setup.html) 構文を書くことで使えます。以下は Composition API を使った簡単なコンポーネントの例です。

```vue
<script setup>
Expand Down

0 comments on commit 764a91e

Please sign in to comment.