The `react-native-react-query-devtools` package provides a dedicated debugging interface for applications utilizing TanStack React Query within a React Native environment. It offers functionalities analogous to its web counterpart, including an online/offline network toggle, comprehensive cache management for clearing queries and mutations, and a movable, resizable modal interface. The package aims to enhance the debugging experience on mobile platforms with a modern UI, improved query and mutation inspectors, and a copy-to-clipboard feature (which requires a platform-specific `onCopy` implementation). While the current npm metadata indicates version 1.5.1, recent changelogs from `@buoy-gg` (potentially a related project or monorepo by the same author) show versions up to 2.1.10, suggesting ongoing, active development, though the direct versioning for this specific package is ambiguous. Its key differentiator is adapting the well-known React Query Dev Tools experience specifically for React Native, addressing mobile-specific interaction patterns and environmental requirements.
npm install react-native-react-query-devtoolsVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to integrate `DevToolsBubble` into a React Native application, providing a `QueryClient` and a platform-specific `onCopy` function for clipboard functionality. It assumes an Expo or React Native CLI setup with navigation.
Ensure your project uses React 19.1.0+ and React Native 0.78.0+ for full compatibility, especially if you are using React 19.
Install `react-native-svg` via `npm install react-native-svg` or `yarn add react-native-svg` and follow its installation instructions, particularly for bare React Native projects requiring native module linking.
Provide a correct `onCopy` function that utilizes either `Clipboard.setStringAsync` (Expo) or `Clipboard.setString` (React Native CLI), ensuring the respective clipboard module is imported and available.
Ensure `react-native-svg` is installed (`npm install react-native-svg`) and, for bare React Native projects, native modules are linked (`npx react-native autolink-android-app` and `cd ios && pod install`).
For Expo, install `expo-clipboard` (`npx expo install expo-clipboard`) and import it as `import * as Clipboard from 'expo-clipboard';`. For React Native CLI, ensure `import { Clipboard } from 'react-native';` and use `Clipboard.setString(text)`.Ensure `DevToolsBubble` is a child of `QueryClientProvider` and that `QueryClientProvider` is initialized with a `new QueryClient()` instance, as shown in the quickstart.