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
Copy file name to clipboardexpand all lines: docs/framework/vue/devtools.md
+33-1
Original file line number
Diff line number
Diff line change
@@ -38,6 +38,10 @@ bun add @tanstack/vue-query-devtools
38
38
39
39
By default, Vue Query Devtools are only included in bundles when `process.env.NODE_ENV === 'development'`, so you don't need to worry about excluding them during a production build.
40
40
41
+
## Floating Mode
42
+
43
+
@todo: blabla
44
+
41
45
Devtools will be mounted as a fixed, floating element in your app and provide a toggle in the corner of the screen to show and hide the devtools. This toggle state will be stored and remembered in localStorage across reloads.
42
46
43
47
Place the following code as high in your Vue app as you can. The closer it is to the root of the page, the better it will work!
@@ -57,9 +61,10 @@ import { VueQueryDevtools } from '@tanstack/vue-query-devtools'
57
61
58
62
-`initialIsOpen: Boolean`
59
63
- Set this `true` if you want the dev tools to default to being open.
- The position of the React Query logo to open and close the devtools panel.
67
+
- If `relative`, the button is placed in the location that you render the devtools.
63
68
-`position?: "top" | "bottom" | "left" | "right"`
64
69
- Defaults to `bottom`.
65
70
- The position of the React Query devtools panel.
@@ -73,6 +78,33 @@ import { VueQueryDevtools } from '@tanstack/vue-query-devtools'
73
78
- Default behavior will apply the devtool's styles to the head tag within the DOM.
74
79
- Use this to pass a shadow DOM target to the devtools so that the styles will be applied within the shadow DOM instead of within the head tag in the light DOM.
75
80
81
+
## Embedded Mode
82
+
83
+
@todo: blabla
84
+
85
+
### Options
86
+
87
+
-`style?: React.CSSProperties`
88
+
- Custom styles for the devtools panel
89
+
- Default: `{ height: '500px' }`
90
+
- Example: `{ height: '100%' }`
91
+
- Example: `{ height: '100%', width: '100%' }`
92
+
-`onClose?: () => unknown`
93
+
- Callback function that is called when the devtools panel is closed
94
+
-`client?: QueryClient`,
95
+
- Use this to use a custom QueryClient. Otherwise, the one from the nearest context will be used.
- Use this to predefine some errors that can be triggered on your queries. Initializer will be called (with the specific query) when that error is toggled on from the UI. It must return an Error.
98
+
-`styleNonce?: string`
99
+
- Use this to pass a nonce to the style tag that is added to the document head. This is useful if you are using a Content Security Policy (CSP) nonce to allow inline styles.
100
+
-`shadowDOMTarget?: ShadowRoot`
101
+
- Default behavior will apply the devtool's styles to the head tag within the DOM.
102
+
- Use this to pass a shadow DOM target to the devtools so that the styles will be applied within the shadow DOM instead of within the head tag in the light DOM.
103
+
104
+
## Devtools in production
105
+
106
+
@todo: blabla
107
+
76
108
## Traditional Devtools
77
109
78
110
Vue Query will seamlessly integrate with the [Official Vue devtools](https://github.com/vuejs/devtools-next), adding custom inspector and timeline events.
0 commit comments