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/src/pages/devtools.md
+52-12Lines changed: 52 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,31 +9,71 @@ When you begin your React Query journey, you'll want these devtools by your side
9
9
10
10
> Please note that for now, the devtools **do not support React Native**. If you would like to help use mae the devtools platform agnostic, please let us know!
11
11
12
-
## Quick Installation
12
+
## Import the Devtools
13
13
14
-
To get going as fast as possible, do the following:
14
+
The devtools are bundle split into the `react-query/devtools` package. No need to install anything extra, just:
By default, React Query Devtools are not included in production bundles when `process.env.NODE_ENV === 'production'`, so you don't need to worry about excluding them during a production build.
21
+
22
+
## Floating Mode
23
+
24
+
Floating Mode will mount the devtools 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.
25
+
22
26
Place the following code as high in your React app as you can. The closer it is to the root of the page, the better it will work!
- Set this `true` if you want the dev tools to default to being open
45
+
-`panelProps: PropsObject`
46
+
- Use this to add props to the panel. For example, you can add `className`, `style` (merge and override default style), etc.
47
+
-`closeButtonProps: PropsObject`
48
+
- Use this to add props to the close button. For example, you can add `className`, `style` (merge and override default style), `onClick` (extend default handler), etc.
49
+
-`toggleButtonProps: PropsObject`
50
+
- Use this to add props to the toggle button. For example, you can add `className`, `style` (merge and override default style), `onClick` (extend default handler), etc.
Copy file name to clipboardExpand all lines: docs/src/pages/guides/migrating-to-react-query-3.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -537,3 +537,7 @@ The core of React Query is now fully separated from React, which means it can al
537
537
```js
538
538
import { QueryClient } from'react-query/core'
539
539
```
540
+
541
+
### Devtools are now part of the main repo and npm package
542
+
543
+
The devtools are now included in the `react-query` package itself under the import `react-query/devtools`. Simply replace `react-query-devtools` imports with `react-query/devtools`
Copy file name to clipboardExpand all lines: docs/src/pages/react-native.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,4 +3,4 @@ id: react-native
3
3
title: React Native
4
4
---
5
5
6
-
React Query is designed to work out of the box with React Native, with an expection to the devtools, which are not supported at this time. If you would like to help us make the devtools platform agnostic, please let us know!
6
+
React Query is designed to work out of the box with React Native, with an exeption to the devtools, which are only supported with React DOM at this time. If you would like to help us make the devtools platform agnostic, please let us know!
0 commit comments