
Security News
Bun 1.2.19 Adds Isolated Installs for Better Monorepo Support
Bun 1.2.19 introduces isolated installs for smoother monorepo workflows, along with performance boosts, new tooling, and key compatibility fixes.
reactotron-react-query
Advanced tools
Is there a plugin for Reactotron that allows for similar functionality to the React Query Devtools? Yes! This plugin helps you debug your React Query cache and queries in Reactotron.
npm i @tanstack/react-query
npm i reactotron-react-native --save-dev
npm i reactotron-react-query --save-dev
Create a file queryClient.ts
import { QueryClient } from "@tanstack/react-query"
const queryClient = new QueryClient()
export { queryClient }
Create a file reactotron.ts
import Reactotron from "reactotron-react-native"
import { QueryClientManager, reactotronReactQuery } from "reactotron-react-query"
import { queryClient } from "./queryClient"
const queryClientManager = new QueryClientManager({
// @ts-ignore
queryClient,
})
Reactotron.configure({
onDisconnect: () => {
queryClientManager.unsubscribe()
},
})
.use(reactotronReactQuery(queryClientManager))
.useReactNative()
.connect()
Import the queryClient and reactotron in your App.jsx file.
import { StyleSheet, Text, View } from "react-native"
import { QueryClientProvider } from "react-query"
import { queryClient } from "./queryClient"
if (__DEV__) {
require("./reactotron.ts")
}
export default function App() {
return (
<QueryClientProvider client={queryClient}>
<View style={styles.container}>
<Text>Open up App.js to start working on your app!</Text>
</View>
</QueryClientProvider>
)
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: "#fff",
alignItems: "center",
justifyContent: "center",
},
})
If you want to invalidate a query, you can use custom commands.
FAQs
Reactotron plugin for React Query
The npm package reactotron-react-query receives a total of 7,265 weekly downloads. As such, reactotron-react-query popularity was classified as popular.
We found that reactotron-react-query demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Bun 1.2.19 introduces isolated installs for smoother monorepo workflows, along with performance boosts, new tooling, and key compatibility fixes.
Security News
Popular npm packages like eslint-config-prettier were compromised after a phishing attack stole a maintainer’s token, spreading malicious updates.
Security News
/Research
A phishing attack targeted developers using a typosquatted npm domain (npnjs.com) to steal credentials via fake login pages - watch out for similar scams.