
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
react-query-devtools
Advanced tools
Devtools for React Query
Enjoy this library? Try them all! React Query, React Table, React Form, React Charts
$ npm i --save react-query-devtools
# or
$ yarn add react-query-devtools
Using React Native? Try react-query-native-devtools instead.
By default, React Query Devtools are not imported and used when process.env.NODE_ENV === 'production'
, so you don't need to worry about excluding them during a production build.
If you want to use the devtools in production, you can manually import them (preferably asynchronously code-split) by importing the dist/react-query-devtools.production.min.js
file directly.
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.
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!
import { ReactQueryDevtools } from 'react-query-devtools'
function App() {
return (
<>
{/* The rest of your application */}
<ReactQueryDevtools initialIsOpen={false} />
</>
)
}
initialIsOpen: Boolean
true
if you want the dev tools to default to being openpanelProps: PropsObject
className
, style
(merge and override default style), etc.closeButtonProps: PropsObject
className
, style
(merge and override default style), onClick
(extend default handler), etc.toggleButtonProps: PropsObject
className
, style
(merge and override default style), onClick
(extend default handler), etc.position?: "top-left" | "top-right" | "bottom-left" | "bottom-right"
bottom-left
Embedded Mode will embed the devtools as a regular component in your application. You can style it however you'd like after that!
import { ReactQueryDevtoolsPanel } from 'react-query-devtools'
function App() {
return (
<>
{/* The rest of your application */}
<ReactQueryDevtoolsPanel style={styles} className={className} />
</>
)
}
Use these options to style the dev tools.
style: StyleObject
className: string
FAQs
Devtools for React Query
The npm package react-query-devtools receives a total of 13,962 weekly downloads. As such, react-query-devtools popularity was classified as popular.
We found that react-query-devtools demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.