Interview practice question
Loading code only when it's needed
Frontend Engineering · Async JavaScript and the Browser · Intermediate
A rarely used feature, like a rich text editor, makes your main bundle very large. How do you load it only when needed?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- Dynamic import().
- Load on interaction or route.
- Show loading state.
- Preload on hover/intent.
- Framework lazy helpers.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.