Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@tanstack/react-query-devtools

Package Overview
Dependencies
Maintainers
2
Versions
408
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tanstack/react-query-devtools

Developer tools to interact with and visualize the TanStack/react-query cache

  • 5.62.7
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2M
increased by6.77%
Maintainers
2
Weekly downloads
 
Created

What is @tanstack/react-query-devtools?

@tanstack/react-query-devtools is a set of development tools for React Query, which helps in managing server-state in React applications. It provides a visual interface to inspect and debug queries, mutations, and cache data managed by React Query.

What are @tanstack/react-query-devtools's main functionalities?

Devtools Panel

The Devtools Panel provides a visual interface to inspect and debug queries and mutations. It can be toggled open or closed and provides detailed information about the state of your queries and mutations.

import { ReactQueryDevtools } from '@tanstack/react-query-devtools';

function App() {
  return (
    <>
      <YourAppComponents />
      <ReactQueryDevtools initialIsOpen={false} />
    </>
  );
}

Query Inspection

Query Inspection allows you to see the status, data, and error states of your queries. This is useful for debugging and ensuring that your queries are working as expected.

import { useQuery } from '@tanstack/react-query';

function MyComponent() {
  const { data, error, isLoading } = useQuery('myQueryKey', fetchMyData);

  return (
    <div>
      {isLoading ? 'Loading...' : error ? 'Error!' : data}
    </div>
  );
}

Mutation Inspection

Mutation Inspection allows you to see the status and results of your mutations. This helps in debugging and ensuring that your mutations are being executed correctly.

import { useMutation } from '@tanstack/react-query';

function MyComponent() {
  const mutation = useMutation(newData => fetch('/api/data', { method: 'POST', body: JSON.stringify(newData) }));

  return (
    <button onClick={() => mutation.mutate({ foo: 'bar' })}>
      Submit
    </button>
  );
}

Other packages similar to @tanstack/react-query-devtools

FAQs

Package last updated on 10 Dec 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc