Skip to content

Commit a7dff4a

Browse files
committed
README added
1 parent 7043dd3 commit a7dff4a

2 files changed

Lines changed: 198 additions & 0 deletions

File tree

README.md

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
# React Query Native Devtool
2+
3+
React Native Query Devtool is a monorepo containing a React Native component and a standalone app to visualize query data in a similar way to react-query-devtools for the web.
4+
5+
## Features
6+
7+
- Provides a component for integrating query data in React Native applications running react-query v3, and @tanstack/react-query v4 and v5.
8+
- Includes a standalone app to visualize and help debug query data.
9+
10+
## Standalone App
11+
12+
The standalone app allows you to visualize and debug query data from your React Native application using the `@jdl/react-native-query-devtool` package.
13+
14+
## Installation
15+
16+
You can download the standalone app from the following link. Currently, it's available only for macOS M1:
17+
18+
[Download latest App](https://github.com/jossydeleon/react-native-query-devtool-monorepo/releases)
19+
20+
**Windows and Linux users:** You need to build the app from source as it's currently only available for macOS M1. Ensure to set up your environment accordingly before building the app.
21+
22+
```bash
23+
# Go to app folder
24+
cd react-native-query-devtool-app
25+
26+
# Install dependencies
27+
yarn
28+
29+
# Build
30+
yarn build-server
31+
```
32+
33+
## React Native Component
34+
35+
To use the devtool component in your React Native project, install the package:
36+
37+
```bash
38+
npm install @jdl/react-native-query-devtool
39+
# or
40+
yarn add @jdl/react-native-query-devtool
41+
```
42+
43+
## Usage
44+
45+
In your React Native application, import `QueryNativeDevtool` to send query data to the server app for debugging:
46+
47+
```javascript
48+
import { QueryNativeDevtool } from "@jdl/react-native-query-devtool";
49+
50+
export default function App() {
51+
return (
52+
<QueryClientProvider client={queryClient}>
53+
<View style={styles.container}>
54+
<Main />
55+
</View>
56+
<QueryNativeDevtool queryClient={queryClient} />
57+
</QueryClientProvider>
58+
);
59+
}
60+
```
61+
62+
## Support for react-query v3
63+
64+
If your app runs `react-query v3` pass `version="v3"` prop to `QueryNativeDevtool`
65+
66+
```javascript
67+
import { QueryNativeDevtool } from "@jdl/react-native-query-devtool";
68+
69+
export default function App() {
70+
return (
71+
<QueryClientProvider client={queryClient}>
72+
<View style={styles.container}>
73+
<Main />
74+
</View>
75+
<QueryNativeDevtool queryClient={queryClient} version="v3" />
76+
</QueryClientProvider>
77+
);
78+
}
79+
```
80+
81+
This will enable your React Native application to send query data to the Electron app for debugging purposes.
82+
83+
## Examples
84+
85+
In the example folder, you can find example projects demonstrating the usage of `@jdl/react-native-query-devtool` with different versions of React Query (v3, v4, and v5). To test the examples, navigate to the example folder, select the desired example, and run yarn ios or yarn android.
86+
87+
```bash
88+
cd example
89+
90+
# Navigate to the desired example, for example:
91+
cd react-query-v3
92+
93+
# Install dependencies
94+
yarn
95+
96+
# Run example
97+
yarn ios
98+
# or
99+
yarn android
100+
```
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
# @jdl/react-native-query-devtool
2+
3+
## Features
4+
5+
- Provides a component for integrating query data in React Native applications running react-query v3, and @tanstack/react-query v4 and v5.
6+
- Includes a standalone app to visualize and help debug query data.
7+
8+
## Standalone App
9+
10+
The standalone app allows you to visualize and debug query data from your React Native application using the `@jdl/react-native-query-devtool` package.
11+
12+
## Installation
13+
14+
You can download the standalone app from the following link. Currently, it's available only for macOS M1:
15+
16+
[Download latest App](https://github.com/jossydeleon/react-native-query-devtool-monorepo/releases)
17+
18+
**Windows and Linux users:** You need to build the app from source as it's currently only available for macOS M1. Ensure to set up your environment accordingly before building the app.
19+
20+
```bash
21+
# Go to app folder
22+
cd react-native-query-devtool-app
23+
24+
# Install dependencies
25+
yarn
26+
27+
# Build
28+
yarn build-server
29+
```
30+
31+
## React Native Component
32+
33+
To use the devtool component in your React Native project, install the package:
34+
35+
```bash
36+
npm install @jdl/react-native-query-devtool
37+
# or
38+
yarn add @jdl/react-native-query-devtool
39+
```
40+
41+
## Usage
42+
43+
In your React Native application, import `QueryNativeDevtool` to send query data to the Electron app for debugging:
44+
45+
```javascript
46+
import { QueryNativeDevtool } from "@jdl/react-native-query-devtool";
47+
48+
export default function App() {
49+
return (
50+
<QueryClientProvider client={queryClient}>
51+
<View style={styles.container}>
52+
<Main />
53+
</View>
54+
<QueryNativeDevtool queryClient={queryClient} />
55+
</QueryClientProvider>
56+
);
57+
}
58+
```
59+
60+
## Support for react-query v3
61+
62+
If your app runs `react-query v3` pass `version="v3"` prop to `QueryNativeDevtool`
63+
64+
```javascript
65+
import { QueryNativeDevtool } from "@jdl/react-native-query-devtool";
66+
67+
export default function App() {
68+
return (
69+
<QueryClientProvider client={queryClient}>
70+
<View style={styles.container}>
71+
<Main />
72+
</View>
73+
<QueryNativeDevtool queryClient={queryClient} version="v3" />
74+
</QueryClientProvider>
75+
);
76+
}
77+
```
78+
79+
This will enable your React Native application to send query data to the server app for debugging purposes.
80+
81+
## Examples
82+
83+
In the example folder, you can find example projects demonstrating the usage of `@jdl/react-native-query-devtool` with different versions of React Query (v3, v4, and v5). To test the examples, navigate to the example folder, select the desired example, and run yarn ios or yarn android.
84+
85+
```bash
86+
cd example
87+
88+
# Navigate to the desired example, for example:
89+
cd react-query-v3
90+
91+
# Install dependencies
92+
yarn
93+
94+
# Run example
95+
yarn ios
96+
# or
97+
yarn android
98+
```

0 commit comments

Comments
 (0)