You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: dist/README.md
+23-23Lines changed: 23 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -105,20 +105,20 @@ Use this function to initialize redux-saga-query. You should call it once per do
105
105
106
106
-**Required**: No
107
107
-**Type**: Function
108
-
-**Description**: Accepts an error thrown by `fn` function of query or mutation and returns some value. Value returned by this function will be re-thrown and stored in domain storage, so it should be serializable. Applies for both queries and mutations
108
+
-**Description**: Accepts an error thrown by _fn_ function of query or mutation and returns some value. Value returned by this function will be re-thrown and stored in domain storage, so it should be serializable. Applies for both queries and mutations
109
109
-**Default value**: Function that extracts a message from error or error name if message is missing. If both are missing - returns _"An error occurred"_ string
110
110
111
111
`retry`
112
112
113
113
-**Required**: No
114
114
-**Type**: Number
115
-
-**Description**: Amount of retries that should be done for query and mutation `fn` function in case it throws an error
115
+
-**Description**: Amount of retries that should be done for query and mutation _fn_ function in case it throws an error
116
116
117
117
`retryDelay`
118
118
119
119
-**Required**: No
120
120
-**Type**: Number
121
-
-**Description**: Amount of time in milliseconds that should pass until next retry will be executed in case `fn` function of query or mutation throws an error
121
+
-**Description**: Amount of time in milliseconds that should pass until next retry will be executed in case _fn_ function of query or mutation throws an error
122
122
123
123
`query`
124
124
@@ -199,47 +199,47 @@ Use this function to initialize redux-saga-query. You should call it once per do
199
199
`isLoading`
200
200
201
201
-**Type**: Boolean
202
-
-**Description**: Has value `true` if `fn` function of query is being requested for the first time
202
+
-**Description**: Has value _true_ if _fn_ function of query is being requested for the first time
203
203
204
204
`isFetching`
205
205
206
206
-**Type**: Boolean
207
-
-**Description**: Has value `true` if `fn` function of query is being requested at any time
207
+
-**Description**: Has value _true_ if _fn_ function of query is being requested at any time
208
208
209
209
`isLoaded`
210
210
211
211
-**Type**: Boolean
212
-
-**Description**: Has value `true` if `fn` function of query has successfully derived its data
212
+
-**Description**: Has value _true_ if _fn_ function of query has successfully derived its data
213
213
214
214
`isError`
215
215
216
216
-**Type**: Boolean
217
-
-**Description**: Has value `true` if `fn` function of query has thrown an error or any error has been thrown during query execution
217
+
-**Description**: Has value _true_ if _fn_ function of query has thrown an error or any error has been thrown during query execution
218
218
219
219
`isValid`
220
220
221
221
-**Type**: Boolean
222
-
-**Description**: Has value `true` if query data doesn't need to be requested again. In other words, it's not stale because `staleTime` milliseconds has not passed yet. But keep in mind that this value won't be updated automatically if nothing is being requested yet using the respective query Key. For example, if you have data that is valid and you didn't request it again after it had become invalid, this field will still show you that it's valid even if its staleTime had already passed. The only way to update state and get fresh status of this field is to trigger request again somewhere
222
+
-**Description**: Has value _true_ if query data doesn't need to be requested again. In other words, it's not stale because _staleTime_ milliseconds has not passed yet. But keep in mind that this value won't be updated automatically if nothing is being requested yet using the respective query Key. For example, if you have data that is valid and you didn't request it again after it had become invalid, this field will still show you that it's valid even if its staleTime had already passed. The only way to update state and get fresh status of this field is to trigger request again somewhere
223
223
224
224
`isReset`
225
225
226
226
-**Type**: Boolean
227
-
-**Description**: Has value `true` if fn query data is in reset state. Technically, a reset state is when you have no data but a query record is present in the domain state. Redux-saga-query does not reset your data. It can only be reset by you manually by calling [reset](https://github.com/zavvdev/redux-saga-query/tree/main?tab=readme-ov-file#initsagaquery) function
227
+
-**Description**: Has value _true_ if fn query data is in reset state. Technically, a reset state is when you have no data but a query record is present in the domain state. Redux-saga-query does not reset your data. It can only be reset by you manually by calling [reset](https://github.com/zavvdev/redux-saga-query/tree/main?tab=readme-ov-file#initsagaquery) function
228
228
229
229
`timestamp`
230
230
231
231
-**Type**: Number | Undefined
232
-
-**Description**: Has the last timestamp when `fn` function of query has successfully derived its data
232
+
-**Description**: Has the last timestamp when _fn_ function of query has successfully derived its data
233
233
234
234
`data`
235
235
236
236
-**Type**: Unknown | Null
237
-
-**Description**: Data derived from `fn` function of query
237
+
-**Description**: Data derived from _fn_ function of query
238
238
239
239
`error`
240
240
241
241
-**Type**: Unknown | Null
242
-
-**Description**: Value returned by `extractError` function
242
+
-**Description**: Value returned by _extractError_ function
243
243
244
244
### MutationRecord
245
245
@@ -249,27 +249,27 @@ Use this function to initialize redux-saga-query. You should call it once per do
249
249
`isLoading`
250
250
251
251
-**Type**: Boolean
252
-
-**Description**: Has value `true` if `fn` function of mutation is being executed
252
+
-**Description**: Has value _true_ if _fn_ function of mutation is being executed
253
253
254
254
`isLoaded`
255
255
256
256
-**Type**: Boolean
257
-
-**Description**: Has value `true` if `fn` function of mutation has successfully derived its data
257
+
-**Description**: Has value _true_ if _fn_ function of mutation has successfully derived its data
258
258
259
259
`isError`
260
260
261
261
-**Type**: Boolean
262
-
-**Description**: Has value `true` if `fn` function of mutation has thrown an error or any error has been thrown during mutation execution
262
+
-**Description**: Has value _true_ if _fn_ function of mutation has thrown an error or any error has been thrown during mutation execution
263
263
264
264
`data`
265
265
266
266
-**Type**: Unknown | Null
267
-
-**Description**: Data derived from `fn` function of mutation
267
+
-**Description**: Data derived from _fn_ function of mutation
268
268
269
269
`error`
270
270
271
271
-**Type**: Unknown | Null
272
-
-**Description**: Value returned by `extractError` function
272
+
-**Description**: Value returned by _extractError_ function
273
273
274
274
### reducer
275
275
@@ -302,10 +302,10 @@ Use this function to initialize redux-saga-query. You should call it once per do
302
302
303
303
`fn` - Any function that returns some serializable data
304
304
305
-
`options` - Fully partial [options](https://github.com/zavvdev/redux-saga-query/blob/272e83e5e8038f11e0231e6f4700f56e8d096b94/src/index.d.ts#L1) that will be applied only for this specific query. Represented as an object the same as in `initSagaQuery`_query_ argument but fully partial
305
+
`options` - Fully partial [options](https://github.com/zavvdev/redux-saga-query/blob/272e83e5e8038f11e0231e6f4700f56e8d096b94/src/index.d.ts#L1) that will be applied only for this specific query. Represented as an object the same as in [initSagaQuery](https://github.com/zavvdev/redux-saga-query?tab=readme-ov-file#initsagaquery)_query_ argument but fully partial
306
306
307
-
-**Returns**: Generator function which yields redux-saga effects. Returns the result of `fn` if it has successfully derived data or throws an error with value returned from `extractError` function
308
-
-**Description**: Caches the data returned from `fn` function
307
+
-**Returns**: Generator function which yields redux-saga effects. Returns the result of _fn_ if it has successfully derived data or throws an error with value returned from _extractError_ function
308
+
-**Description**: Caches the data returned from _fn_ function
309
309
310
310
### mutation
311
311
@@ -316,10 +316,10 @@ Use this function to initialize redux-saga-query. You should call it once per do
316
316
317
317
`fn` - Any function that returns some serializable data
318
318
319
-
`options` - [Options](https://github.com/zavvdev/redux-saga-query/blob/272e83e5e8038f11e0231e6f4700f56e8d096b94/src/index.d.ts#L8) that will be applied only for this specific mutation. Represented as an object the same as in `initSagaQuery`_mutation_ argument
319
+
`options` - [Options](https://github.com/zavvdev/redux-saga-query/blob/272e83e5e8038f11e0231e6f4700f56e8d096b94/src/index.d.ts#L8) that will be applied only for this specific mutation. Represented as an object the same as in [initSagaQuery](https://github.com/zavvdev/redux-saga-query?tab=readme-ov-file#initsagaquery)_mutation_ argument
320
320
321
-
-**Returns**: Generator function which yields redux-saga effects. Returns the result of `fn` if it has successfully derived data or throws an error with value returned from `extractError` function
322
-
-**Description**: Does not cache the data returned from `fn` function
321
+
-**Returns**: Generator function which yields redux-saga effects. Returns the result of _fn_ if it has successfully derived data or throws an error with value returned from _extractError_ function
322
+
-**Description**: Does not cache the data returned from _fn_ function
0 commit comments