Skip to main content
InterviewHubPRO
Section Overview
Q23

Question 23 of 50

Part 2: Core Architecture & Implementation (Mid-Level)

46%
Vue.js & Composition API (50 Qs)•Part 2: Core Architecture & Implementation (Mid-Level)

Async Components (`defineAsyncComponent`).

senior LevelCode ExampleComponentsAsync & PromisesSystem Design

In Simple Words: Lazy-loads components on-demand using dynamic imports:

typescript
import { defineAsyncComponent } from 'vue';

const HeavyChart = defineAsyncComponent(() =>
  import('@/components/HeavyChart.vue')
);

Splits the component into a separate JavaScript chunk, keeping initial bundle size minimal.