Skip to content

Commit 44625fb

Browse files
Merge pull request #3 from aach/patch-1
docs: add syntax highlighting to the examples
2 parents 88f4c34 + c30357d commit 44625fb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ yarn add vue-react-query
4848

4949
1. Attach vue-react-query to your Vue application
5050

51-
```
51+
```ts
5252
import { createApp } from "vue";
5353
import { QueryClient, VUE_QUERY_CLIENT } from "vue-react-query";
5454

@@ -62,15 +62,15 @@ yarn add vue-react-query
6262

6363
2. Use query
6464

65-
```
65+
```ts
6666
import { useQuery } from "vue-react-query";
6767

6868
const query = useQuery("todos", getTodos);
6969
```
7070

7171
3. If you need to update options on your query dynamically, make sure to pass it as reactive property
7272

73-
```
73+
```ts
7474
const id = ref(1);
7575
const queryKey = reactive(["todos", { id }]);
7676
const queryFunction = () => getTodos(id),
@@ -95,7 +95,7 @@ Check [Examples section](#examples).
9595

9696
**_Disclaimer: Devtools not supported on Vue 2.x_**
9797

98-
```
98+
```vue
9999
<script lang="ts">
100100
import { defineComponent } from "vue";
101101
import { VueQueryDevTools } from "vue-react-query/devtools";

0 commit comments

Comments
 (0)