Skip to content

Commit dcc4a16

Browse files
authored
docs(framework/vue/devtools): inline the toggle and 'onClose' handler in the 'Embedded Mode' example to match the other adapters (#10856)
1 parent b1337cd commit dcc4a16

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

docs/framework/vue/devtools.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,18 +94,16 @@ Place the following code as high in your Vue app as you can. The closer it is to
9494
<script setup>
9595
import { ref } from 'vue'
9696
import { VueQueryDevtoolsPanel } from '@tanstack/vue-query-devtools'
97+
9798
const isOpen = ref(false)
98-
function toggleDevtools() {
99-
isOpen.value = !isOpen.value
100-
}
10199
</script>
102100
103101
<template>
104102
<h1>The app!</h1>
105-
<button @click="toggleDevtools">
103+
<button @click="isOpen = !isOpen">
106104
{{ isOpen ? 'Close' : 'Open' }} the devtools panel
107105
</button>
108-
<VueQueryDevtoolsPanel v-if="isOpen" :onClose="toggleDevtools" />
106+
<VueQueryDevtoolsPanel v-if="isOpen" :onClose="() => (isOpen = false)" />
109107
</template>
110108
```
111109

0 commit comments

Comments
 (0)