Skip to content

fix: Change the options object - defineAsyncComponent #458

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 19, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions src/api/global-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,12 +182,16 @@ const AsyncComp = defineAsyncComponent({
// The error component will be displayed if a timeout is
// provided and exceeded. Default: Infinity.
timeout: 3000,
// A function that returns a boolean indicating whether the async component should retry when the loader promise rejects
retryWhen: error => error.code !== 404,
// Maximum allowed retries number
maxRetries: 3,
// Defining if component is suspensible
suspensible: false
suspensible: false,
/**
*
* @param {*} error Error message object
* @param {*} retry A function that indicating whether the async component should retry when the loader promise rejects
* @param {*} fail End of failure
* @param {*} attempts Maximum allowed retries number
*/
onError(error, retry, fail, attempts) {},
})
```

Expand Down