Skip to content

Commit 3ae54d3

Browse files
committed
release 1.0.3 | update documentation
1 parent a09eb94 commit 3ae54d3

File tree

2 files changed

+24
-24
lines changed

2 files changed

+24
-24
lines changed

dist/README.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -105,20 +105,20 @@ Use this function to initialize redux-saga-query. You should call it once per do
105105

106106
- **Required**: No
107107
- **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
109109
- **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
110110

111111
`retry`
112112

113113
- **Required**: No
114114
- **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
116116

117117
`retryDelay`
118118

119119
- **Required**: No
120120
- **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
122122

123123
`query`
124124

@@ -199,47 +199,47 @@ Use this function to initialize redux-saga-query. You should call it once per do
199199
`isLoading`
200200

201201
- **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
203203

204204
`isFetching`
205205

206206
- **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
208208

209209
`isLoaded`
210210

211211
- **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
213213

214214
`isError`
215215

216216
- **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
218218

219219
`isValid`
220220

221221
- **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
223223

224224
`isReset`
225225

226226
- **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
228228

229229
`timestamp`
230230

231231
- **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
233233

234234
`data`
235235

236236
- **Type**: Unknown | Null
237-
- **Description**: Data derived from `fn` function of query
237+
- **Description**: Data derived from _fn_ function of query
238238

239239
`error`
240240

241241
- **Type**: Unknown | Null
242-
- **Description**: Value returned by `extractError` function
242+
- **Description**: Value returned by _extractError_ function
243243

244244
### MutationRecord
245245

@@ -249,27 +249,27 @@ Use this function to initialize redux-saga-query. You should call it once per do
249249
`isLoading`
250250

251251
- **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
253253

254254
`isLoaded`
255255

256256
- **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
258258

259259
`isError`
260260

261261
- **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
263263

264264
`data`
265265

266266
- **Type**: Unknown | Null
267-
- **Description**: Data derived from `fn` function of mutation
267+
- **Description**: Data derived from _fn_ function of mutation
268268

269269
`error`
270270

271271
- **Type**: Unknown | Null
272-
- **Description**: Value returned by `extractError` function
272+
- **Description**: Value returned by _extractError_ function
273273

274274
### reducer
275275

@@ -302,10 +302,10 @@ Use this function to initialize redux-saga-query. You should call it once per do
302302

303303
`fn` - Any function that returns some serializable data
304304

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
306306

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
309309

310310
### mutation
311311

@@ -316,10 +316,10 @@ Use this function to initialize redux-saga-query. You should call it once per do
316316

317317
`fn` - Any function that returns some serializable data
318318

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
320320

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
323323

324324
### invalidate
325325

dist/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "redux-saga-query",
33
"type": "module",
4-
"version": "1.0.2",
4+
"version": "1.0.3",
55
"description": "Automation of API state management with redux-saga",
66
"main": "index.js",
77
"types": "index.d.ts",

0 commit comments

Comments
 (0)