@rozenite/tanstack-query-plugin 1.0.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Szymon Chmal
4
+ Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ of this software and associated documentation files (the "Software"), to deal
6
+ in the Software without restriction, including without limitation the rights
7
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the Software is
9
+ furnished to do so, subject to the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be included in all
12
+ copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,108 @@
1
+ ![rozenite-baner](https://github.com/user-attachments/assets/6d21839f-e624-4d8b-85a2-5f7ef1600b28)
2
+
3
+ ### A Rozenite plugin that integrates TanStack Query DevTools into React Native DevTools for enhanced query debugging and management.
4
+
5
+ [![mit licence][license-badge]][license] [![npm downloads][npm-downloads-badge]][npm-downloads] [![Chat][chat-badge]][chat] [![PRs Welcome][prs-welcome-badge]][prs-welcome]
6
+
7
+ The Rozenite TanStack Query Plugin provides a seamless integration of TanStack Query DevTools into your React Native DevTools environment. It offers real-time query monitoring, cache management, and debugging capabilities, all within the familiar DevTools interface.
8
+
9
+ ## Features
10
+
11
+ - **Query Monitoring**: Real-time monitoring of all queries and mutations
12
+ - **Cache Management**: Visual cache inspection and management tools
13
+ - **Query Actions**: Refetch, invalidate, reset, and remove queries
14
+ - **State Manipulation**: Trigger loading states and error conditions for testing
15
+ - **Mutation Tracking**: Monitor mutation states and progress
16
+ - **Bidirectional Communication**: Real-time sync between device and DevTools
17
+ - **Production Safety**: Automatically disabled in production builds
18
+
19
+ ## Installation
20
+
21
+ Install the TanStack Query plugin as a dependency:
22
+
23
+ ```bash
24
+ npm install @rozenite/tanstack-query-plugin
25
+ ```
26
+
27
+ ## Quick Start
28
+
29
+ ### 1. Install the Plugin
30
+
31
+ ```bash
32
+ npm install @rozenite/tanstack-query-plugin
33
+ ```
34
+
35
+ ### 2. Integrate with Your Query Client
36
+
37
+ Add the DevTools hook to your React Native app:
38
+
39
+ ```typescript
40
+ // App.tsx
41
+ import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
42
+ import { useTanStackQueryDevTools } from '@rozenite/tanstack-query-plugin';
43
+
44
+ const queryClient = new QueryClient();
45
+
46
+ function App() {
47
+ // Enable DevTools in development
48
+ useTanStackQueryDevTools(queryClient);
49
+
50
+ return (
51
+ <QueryClientProvider client={queryClient}>
52
+ {/* Your app components */}
53
+ </QueryClientProvider>
54
+ );
55
+ }
56
+ ```
57
+
58
+ ### 3. Access DevTools
59
+
60
+ Start your development server and open React Native DevTools. You'll find the "TanStack Query" panel in the DevTools interface.
61
+
62
+ ## Usage
63
+
64
+ ### Basic Integration
65
+
66
+ The plugin automatically integrates with your existing TanStack Query setup:
67
+
68
+ ```typescript
69
+ import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
70
+ import { useTanStackQueryDevTools } from '@rozenite/tanstack-query-plugin';
71
+
72
+ const queryClient = new QueryClient({
73
+ defaultOptions: {
74
+ queries: {
75
+ staleTime: 5 * 60 * 1000, // 5 minutes
76
+ },
77
+ },
78
+ });
79
+
80
+ function App() {
81
+ // DevTools are automatically enabled in development
82
+ useTanStackQueryDevTools(queryClient);
83
+
84
+ return (
85
+ <QueryClientProvider client={queryClient}>
86
+ <YourApp />
87
+ </QueryClientProvider>
88
+ );
89
+ }
90
+ ```
91
+
92
+ ## Made with ❤️ at Callstack
93
+
94
+ `rozenite` is an open source project and will always remain free to use. If you think it's cool, please star it 🌟.
95
+
96
+ [Callstack][callstack-readme-with-love] is a group of React and React Native geeks, contact us at [hello@callstack.com](mailto:hello@callstack.com) if you need any help with these or just want to say hi!
97
+
98
+ Like the project? ⚛️ [Join the team](https://callstack.com/careers/?utm_campaign=Senior_RN&utm_source=github&utm_medium=readme) who does amazing stuff for clients and drives React Native Open Source! 🔥
99
+
100
+ [callstack-readme-with-love]: https://callstack.com/?utm_source=github.com&utm_medium=referral&utm_campaign=rozenite&utm_term=readme-with-love
101
+ [license-badge]: https://img.shields.io/npm/l/rozenite?style=for-the-badge
102
+ [license]: https://github.com/callstackincubator/rozenite/blob/main/LICENSE
103
+ [npm-downloads-badge]: https://img.shields.io/npm/dm/rozenite?style=for-the-badge
104
+ [npm-downloads]: https://www.npmjs.com/package/@rozenite/tanstack-query-plugin
105
+ [prs-welcome-badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=for-the-badge
106
+ [prs-welcome]: https://github.com/callstackincubator/rozenite/blob/main/CONTRIBUTING.md
107
+ [chat-badge]: https://img.shields.io/discord/426714625279524876.svg?style=for-the-badge
108
+ [chat]: https://discord.gg/Q4yr2rTWYF