Vue · Middle · Question 16 of 75

What does defineAsyncComponent do?

const Chart = defineAsyncComponent(() => import("./Chart.vue"));

Explanation

The options form adds loadingComponent, errorComponent, delay and timeout. Combine with v-if so heavy widgets download only when needed.

Further reading

Problem with a question

Vue · Middle · question 16

Test yourself

Take the Vue · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz