We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b1337cd commit dcc4a16Copy full SHA for dcc4a16
1 file changed
docs/framework/vue/devtools.md
@@ -94,18 +94,16 @@ Place the following code as high in your Vue app as you can. The closer it is to
94
<script setup>
95
import { ref } from 'vue'
96
import { VueQueryDevtoolsPanel } from '@tanstack/vue-query-devtools'
97
+
98
const isOpen = ref(false)
-function toggleDevtools() {
99
- isOpen.value = !isOpen.value
100
-}
101
</script>
102
103
<template>
104
<h1>The app!</h1>
105
- <button @click="toggleDevtools">
+ <button @click="isOpen = !isOpen">
106
{{ isOpen ? 'Close' : 'Open' }} the devtools panel
107
</button>
108
- <VueQueryDevtoolsPanel v-if="isOpen" :onClose="toggleDevtools" />
+ <VueQueryDevtoolsPanel v-if="isOpen" :onClose="() => (isOpen = false)" />
109
</template>
110
```
111
0 commit comments