react-query-kit 1.2.7 → 1.2.8
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/README.md +8 -9
- package/build/stats-html.html +1 -1
- package/build/stats.json +53 -53
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -17,14 +17,13 @@
|
|
|
17
17
|
|
|
18
18
|
---
|
|
19
19
|
|
|
20
|
-
##
|
|
20
|
+
## What could you benefit from it
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
- Set `defaultOptions` for custom ReactQuery hooks easier and clearer
|
|
22
|
+
- Make `queryKey` strongly related with `queryFn`
|
|
23
|
+
- Manage `queryKey` in a type-safe way
|
|
24
|
+
- Generate quickly a custom ReactQuery hook
|
|
25
|
+
- Make `queryClient`'s operations more clearly associated with which custom ReactQuery hook
|
|
26
|
+
- Set defaultOptions for custom ReactQuery hooks easier and clearer
|
|
28
27
|
|
|
29
28
|

|
|
30
29
|
|
|
@@ -54,9 +53,9 @@ This module is distributed via [npm][npm] which is bundled with [node][node] and
|
|
|
54
53
|
should be installed as one of your project's `dependencies`:
|
|
55
54
|
|
|
56
55
|
```bash
|
|
57
|
-
$ npm i
|
|
56
|
+
$ npm i react-query-kit
|
|
58
57
|
# or
|
|
59
|
-
$ yarn add
|
|
58
|
+
$ yarn add react-query-kit
|
|
60
59
|
```
|
|
61
60
|
|
|
62
61
|
# Examples
|
package/build/stats-html.html
CHANGED
|
@@ -4014,7 +4014,7 @@ var drawChart = (function (exports) {
|
|
|
4014
4014
|
</script>
|
|
4015
4015
|
<script>
|
|
4016
4016
|
/*<!--*/
|
|
4017
|
-
const data = {"version":2,"tree":{"name":"root","children":[{"name":"index.production.js","children":[{"name":"src","children":[{"uid":"
|
|
4017
|
+
const data = {"version":2,"tree":{"name":"root","children":[{"name":"index.production.js","children":[{"name":"src","children":[{"uid":"75ce-1","name":"createBaseQuery.ts"},{"uid":"75ce-3","name":"utils.ts"},{"uid":"75ce-5","name":"createInfiniteQuery.ts"},{"uid":"75ce-7","name":"createMutation.ts"},{"uid":"75ce-9","name":"createQuery.tsx"},{"uid":"75ce-11","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"75ce-1":{"renderedLength":1201,"gzipLength":427,"brotliLength":0,"mainUid":"75ce-0"},"75ce-3":{"renderedLength":292,"gzipLength":169,"brotliLength":0,"mainUid":"75ce-2"},"75ce-5":{"renderedLength":177,"gzipLength":131,"brotliLength":0,"mainUid":"75ce-4"},"75ce-7":{"renderedLength":457,"gzipLength":211,"brotliLength":0,"mainUid":"75ce-6"},"75ce-9":{"renderedLength":161,"gzipLength":121,"brotliLength":0,"mainUid":"75ce-8"},"75ce-11":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"mainUid":"75ce-10"}},"nodeMetas":{"75ce-0":{"id":"/src/createBaseQuery.ts","moduleParts":{"index.production.js":"75ce-1"},"imported":[{"uid":"75ce-12"}],"importedBy":[{"uid":"75ce-4"},{"uid":"75ce-8"}]},"75ce-2":{"id":"/src/utils.ts","moduleParts":{"index.production.js":"75ce-3"},"imported":[],"importedBy":[{"uid":"75ce-4"},{"uid":"75ce-8"}]},"75ce-4":{"id":"/src/createInfiniteQuery.ts","moduleParts":{"index.production.js":"75ce-5"},"imported":[{"uid":"75ce-12"},{"uid":"75ce-0"},{"uid":"75ce-2"}],"importedBy":[{"uid":"75ce-10"}]},"75ce-6":{"id":"/src/createMutation.ts","moduleParts":{"index.production.js":"75ce-7"},"imported":[{"uid":"75ce-12"}],"importedBy":[{"uid":"75ce-10"}]},"75ce-8":{"id":"/src/createQuery.tsx","moduleParts":{"index.production.js":"75ce-9"},"imported":[{"uid":"75ce-12"},{"uid":"75ce-0"},{"uid":"75ce-2"}],"importedBy":[{"uid":"75ce-10"}]},"75ce-10":{"id":"/src/index.ts","moduleParts":{"index.production.js":"75ce-11"},"imported":[{"uid":"75ce-4"},{"uid":"75ce-6"},{"uid":"75ce-8"}],"importedBy":[],"isEntry":true},"75ce-12":{"id":"@tanstack/react-query","moduleParts":{},"imported":[],"importedBy":[{"uid":"75ce-4"},{"uid":"75ce-6"},{"uid":"75ce-8"},{"uid":"75ce-0"}],"isExternal":true}},"env":{"rollup":"2.77.2"},"options":{"gzip":true,"brotli":false,"sourcemap":false}};
|
|
4018
4018
|
|
|
4019
4019
|
const run = () => {
|
|
4020
4020
|
const width = window.innerWidth;
|
package/build/stats.json
CHANGED
|
@@ -10,27 +10,27 @@
|
|
|
10
10
|
"name": "src",
|
|
11
11
|
"children": [
|
|
12
12
|
{
|
|
13
|
-
"uid": "
|
|
13
|
+
"uid": "75ce-14",
|
|
14
14
|
"name": "createBaseQuery.ts"
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
|
-
"uid": "
|
|
17
|
+
"uid": "75ce-16",
|
|
18
18
|
"name": "utils.ts"
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
|
-
"uid": "
|
|
21
|
+
"uid": "75ce-18",
|
|
22
22
|
"name": "createInfiniteQuery.ts"
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
|
-
"uid": "
|
|
25
|
+
"uid": "75ce-20",
|
|
26
26
|
"name": "createMutation.ts"
|
|
27
27
|
},
|
|
28
28
|
{
|
|
29
|
-
"uid": "
|
|
29
|
+
"uid": "75ce-22",
|
|
30
30
|
"name": "createQuery.tsx"
|
|
31
31
|
},
|
|
32
32
|
{
|
|
33
|
-
"uid": "
|
|
33
|
+
"uid": "75ce-24",
|
|
34
34
|
"name": "index.ts"
|
|
35
35
|
}
|
|
36
36
|
]
|
|
@@ -41,173 +41,173 @@
|
|
|
41
41
|
"isRoot": true
|
|
42
42
|
},
|
|
43
43
|
"nodeParts": {
|
|
44
|
-
"
|
|
44
|
+
"75ce-14": {
|
|
45
45
|
"renderedLength": 1201,
|
|
46
46
|
"gzipLength": 427,
|
|
47
47
|
"brotliLength": 0,
|
|
48
|
-
"mainUid": "
|
|
48
|
+
"mainUid": "75ce-13"
|
|
49
49
|
},
|
|
50
|
-
"
|
|
50
|
+
"75ce-16": {
|
|
51
51
|
"renderedLength": 292,
|
|
52
52
|
"gzipLength": 169,
|
|
53
53
|
"brotliLength": 0,
|
|
54
|
-
"mainUid": "
|
|
54
|
+
"mainUid": "75ce-15"
|
|
55
55
|
},
|
|
56
|
-
"
|
|
56
|
+
"75ce-18": {
|
|
57
57
|
"renderedLength": 177,
|
|
58
58
|
"gzipLength": 131,
|
|
59
59
|
"brotliLength": 0,
|
|
60
|
-
"mainUid": "
|
|
60
|
+
"mainUid": "75ce-17"
|
|
61
61
|
},
|
|
62
|
-
"
|
|
62
|
+
"75ce-20": {
|
|
63
63
|
"renderedLength": 457,
|
|
64
64
|
"gzipLength": 211,
|
|
65
65
|
"brotliLength": 0,
|
|
66
|
-
"mainUid": "
|
|
66
|
+
"mainUid": "75ce-19"
|
|
67
67
|
},
|
|
68
|
-
"
|
|
68
|
+
"75ce-22": {
|
|
69
69
|
"renderedLength": 161,
|
|
70
70
|
"gzipLength": 121,
|
|
71
71
|
"brotliLength": 0,
|
|
72
|
-
"mainUid": "
|
|
72
|
+
"mainUid": "75ce-21"
|
|
73
73
|
},
|
|
74
|
-
"
|
|
74
|
+
"75ce-24": {
|
|
75
75
|
"renderedLength": 0,
|
|
76
76
|
"gzipLength": 0,
|
|
77
77
|
"brotliLength": 0,
|
|
78
|
-
"mainUid": "
|
|
78
|
+
"mainUid": "75ce-23"
|
|
79
79
|
}
|
|
80
80
|
},
|
|
81
81
|
"nodeMetas": {
|
|
82
|
-
"
|
|
82
|
+
"75ce-13": {
|
|
83
83
|
"id": "/src/createBaseQuery.ts",
|
|
84
84
|
"moduleParts": {
|
|
85
|
-
"index.production.js": "
|
|
85
|
+
"index.production.js": "75ce-14"
|
|
86
86
|
},
|
|
87
87
|
"imported": [
|
|
88
88
|
{
|
|
89
|
-
"uid": "
|
|
89
|
+
"uid": "75ce-25"
|
|
90
90
|
}
|
|
91
91
|
],
|
|
92
92
|
"importedBy": [
|
|
93
93
|
{
|
|
94
|
-
"uid": "
|
|
94
|
+
"uid": "75ce-17"
|
|
95
95
|
},
|
|
96
96
|
{
|
|
97
|
-
"uid": "
|
|
97
|
+
"uid": "75ce-21"
|
|
98
98
|
}
|
|
99
99
|
]
|
|
100
100
|
},
|
|
101
|
-
"
|
|
101
|
+
"75ce-15": {
|
|
102
102
|
"id": "/src/utils.ts",
|
|
103
103
|
"moduleParts": {
|
|
104
|
-
"index.production.js": "
|
|
104
|
+
"index.production.js": "75ce-16"
|
|
105
105
|
},
|
|
106
106
|
"imported": [],
|
|
107
107
|
"importedBy": [
|
|
108
108
|
{
|
|
109
|
-
"uid": "
|
|
109
|
+
"uid": "75ce-17"
|
|
110
110
|
},
|
|
111
111
|
{
|
|
112
|
-
"uid": "
|
|
112
|
+
"uid": "75ce-21"
|
|
113
113
|
}
|
|
114
114
|
]
|
|
115
115
|
},
|
|
116
|
-
"
|
|
116
|
+
"75ce-17": {
|
|
117
117
|
"id": "/src/createInfiniteQuery.ts",
|
|
118
118
|
"moduleParts": {
|
|
119
|
-
"index.production.js": "
|
|
119
|
+
"index.production.js": "75ce-18"
|
|
120
120
|
},
|
|
121
121
|
"imported": [
|
|
122
122
|
{
|
|
123
|
-
"uid": "
|
|
123
|
+
"uid": "75ce-25"
|
|
124
124
|
},
|
|
125
125
|
{
|
|
126
|
-
"uid": "
|
|
126
|
+
"uid": "75ce-13"
|
|
127
127
|
},
|
|
128
128
|
{
|
|
129
|
-
"uid": "
|
|
129
|
+
"uid": "75ce-15"
|
|
130
130
|
}
|
|
131
131
|
],
|
|
132
132
|
"importedBy": [
|
|
133
133
|
{
|
|
134
|
-
"uid": "
|
|
134
|
+
"uid": "75ce-23"
|
|
135
135
|
}
|
|
136
136
|
]
|
|
137
137
|
},
|
|
138
|
-
"
|
|
138
|
+
"75ce-19": {
|
|
139
139
|
"id": "/src/createMutation.ts",
|
|
140
140
|
"moduleParts": {
|
|
141
|
-
"index.production.js": "
|
|
141
|
+
"index.production.js": "75ce-20"
|
|
142
142
|
},
|
|
143
143
|
"imported": [
|
|
144
144
|
{
|
|
145
|
-
"uid": "
|
|
145
|
+
"uid": "75ce-25"
|
|
146
146
|
}
|
|
147
147
|
],
|
|
148
148
|
"importedBy": [
|
|
149
149
|
{
|
|
150
|
-
"uid": "
|
|
150
|
+
"uid": "75ce-23"
|
|
151
151
|
}
|
|
152
152
|
]
|
|
153
153
|
},
|
|
154
|
-
"
|
|
154
|
+
"75ce-21": {
|
|
155
155
|
"id": "/src/createQuery.tsx",
|
|
156
156
|
"moduleParts": {
|
|
157
|
-
"index.production.js": "
|
|
157
|
+
"index.production.js": "75ce-22"
|
|
158
158
|
},
|
|
159
159
|
"imported": [
|
|
160
160
|
{
|
|
161
|
-
"uid": "
|
|
161
|
+
"uid": "75ce-25"
|
|
162
162
|
},
|
|
163
163
|
{
|
|
164
|
-
"uid": "
|
|
164
|
+
"uid": "75ce-13"
|
|
165
165
|
},
|
|
166
166
|
{
|
|
167
|
-
"uid": "
|
|
167
|
+
"uid": "75ce-15"
|
|
168
168
|
}
|
|
169
169
|
],
|
|
170
170
|
"importedBy": [
|
|
171
171
|
{
|
|
172
|
-
"uid": "
|
|
172
|
+
"uid": "75ce-23"
|
|
173
173
|
}
|
|
174
174
|
]
|
|
175
175
|
},
|
|
176
|
-
"
|
|
176
|
+
"75ce-23": {
|
|
177
177
|
"id": "/src/index.ts",
|
|
178
178
|
"moduleParts": {
|
|
179
|
-
"index.production.js": "
|
|
179
|
+
"index.production.js": "75ce-24"
|
|
180
180
|
},
|
|
181
181
|
"imported": [
|
|
182
182
|
{
|
|
183
|
-
"uid": "
|
|
183
|
+
"uid": "75ce-17"
|
|
184
184
|
},
|
|
185
185
|
{
|
|
186
|
-
"uid": "
|
|
186
|
+
"uid": "75ce-19"
|
|
187
187
|
},
|
|
188
188
|
{
|
|
189
|
-
"uid": "
|
|
189
|
+
"uid": "75ce-21"
|
|
190
190
|
}
|
|
191
191
|
],
|
|
192
192
|
"importedBy": [],
|
|
193
193
|
"isEntry": true
|
|
194
194
|
},
|
|
195
|
-
"
|
|
195
|
+
"75ce-25": {
|
|
196
196
|
"id": "@tanstack/react-query",
|
|
197
197
|
"moduleParts": {},
|
|
198
198
|
"imported": [],
|
|
199
199
|
"importedBy": [
|
|
200
200
|
{
|
|
201
|
-
"uid": "
|
|
201
|
+
"uid": "75ce-17"
|
|
202
202
|
},
|
|
203
203
|
{
|
|
204
|
-
"uid": "
|
|
204
|
+
"uid": "75ce-19"
|
|
205
205
|
},
|
|
206
206
|
{
|
|
207
|
-
"uid": "
|
|
207
|
+
"uid": "75ce-21"
|
|
208
208
|
},
|
|
209
209
|
{
|
|
210
|
-
"uid": "
|
|
210
|
+
"uid": "75ce-13"
|
|
211
211
|
}
|
|
212
212
|
],
|
|
213
213
|
"isExternal": true
|
package/package.json
CHANGED