Skip to content

Commit 246d485

Browse files
committed
docs: update Installation section
1 parent 2825885 commit 246d485

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

docs/getting-started/installation.md

+24
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,27 @@ yarn add vue-query
1313
```
1414

1515
Vue Query is compatible with Vue 2.x + composition API or 3.x
16+
17+
### Vue Query Initialization
18+
19+
Before starting using Vue Query, you need to initialize it.
20+
21+
There are 2 possible ways to do it.
22+
23+
1. [Vue 3 Only] Using `VueQueryPlugin` (recommended)
24+
25+
```js
26+
import { VueQueryPlugin } from "vue-query";
27+
28+
app.use(VueQueryPlugin);
29+
```
30+
31+
1. Calling `useQueryProvider` in the root component
32+
33+
```
34+
<script setup>
35+
import { useQueryProvider } from 'vue-query';
36+
37+
useQueryProvider();
38+
</script>
39+
```

0 commit comments

Comments
 (0)