Skip to content

Commit 37ba7d2

Browse files
fix: Change the options object: remove the retryWhen, maxRetries attributes, add the onError event, and attach a comment (#458)
1 parent 185d076 commit 37ba7d2

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

src/api/global-api.md

+9-5
Original file line numberDiff line numberDiff line change
@@ -192,12 +192,16 @@ const AsyncComp = defineAsyncComponent({
192192
// The error component will be displayed if a timeout is
193193
// provided and exceeded. Default: Infinity.
194194
timeout: 3000,
195-
// A function that returns a boolean indicating whether the async component should retry when the loader promise rejects
196-
retryWhen: error => error.code !== 404,
197-
// Maximum allowed retries number
198-
maxRetries: 3,
199195
// Defining if component is suspensible
200-
suspensible: false
196+
suspensible: false,
197+
/**
198+
*
199+
* @param {*} error Error message object
200+
* @param {*} retry A function that indicating whether the async component should retry when the loader promise rejects
201+
* @param {*} fail End of failure
202+
* @param {*} attempts Maximum allowed retries number
203+
*/
204+
onError(error, retry, fail, attempts) {},
201205
})
202206
```
203207

0 commit comments

Comments
 (0)