Question · Vue.js course · Module 12: Testing & Deploy
Lazy loading components
How do you implement lazy loading of a component in Vue 3?
Answer options
- import Component lazy from './Component.vue'
- Vue.lazy('./Component.vue')
- Lazy loading is not available in Vue 3
- const Comp = defineAsyncComponent(() => import('./Component.vue'))
You can check the correct answer by solving this task in the CodeWorlds game.