Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@tanstack/react-query-devtools
Advanced tools
Developer tools to interact with and visualize the TanStack/react-query cache
@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.
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>
);
}
Redux DevTools Extension is a development tool for Redux that provides a visual interface to inspect and debug the state of your Redux store. It offers time-travel debugging, action replay, and state inspection. Compared to @tanstack/react-query-devtools, it is specific to Redux and does not provide tools for managing server-state in React applications.
MobX React DevTools is a set of development tools for MobX, a state management library for React. It provides a visual interface to inspect and debug the state managed by MobX. Compared to @tanstack/react-query-devtools, it is specific to MobX and does not provide tools for managing server-state in React applications.
Apollo Client DevTools is a set of development tools for Apollo Client, a GraphQL client for React. It provides a visual interface to inspect and debug GraphQL queries, mutations, and cache data managed by Apollo Client. Compared to @tanstack/react-query-devtools, it is specific to GraphQL and Apollo Client.
FAQs
Developer tools to interact with and visualize the TanStack/react-query cache
The npm package @tanstack/react-query-devtools receives a total of 1,778,751 weekly downloads. As such, @tanstack/react-query-devtools popularity was classified as popular.
We found that @tanstack/react-query-devtools demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.