You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 5, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+34-6Lines changed: 34 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,8 +35,6 @@
35
35
36
36
## Quick Start
37
37
38
-
> This project requires usage of [`@vue/composition-api`](https://github.com/vuejs/composition-api). Make sure you've set that up correctly first.
39
-
40
38
First install `nuxt-composition-api`:
41
39
42
40
```bash
@@ -47,6 +45,18 @@ yarn add nuxt-composition-api
47
45
npm install nuxt-composition-api --save
48
46
```
49
47
48
+
Enable the module in your `nuxt.config.js`
49
+
50
+
```
51
+
{
52
+
buildModules: [
53
+
'nuxt-composition-api'
54
+
]
55
+
}
56
+
```
57
+
58
+
The module automatically installs [`@vue/composition-api`](https://github.com/vuejs/composition-api) as a plugin, so you shouldn't need to do so separately.
59
+
50
60
You will now be able to access the following hooks:
51
61
52
62
### useFetch
@@ -56,8 +66,7 @@ Versions of Nuxt newer than v2.12 support a [custom hook called `fetch`](https:/
For convenience, this package also exports the [`@vue/composition-api`](https://github.com/vuejs/composition-api) methods and hooks, so you can import directly from `nuxt-composition-api`.
0 commit comments