React · Middle · Question 34 of 75
Where is code splitting with lazy usually most beneficial?
- ✓Correct answer: On routes and heavy, rarely needed widgets
- 2On every button and icon, so bundles are smaller
- 3Only on components rendered on the server
Explanation
Route-based splitting gives the biggest win: the user loads code only for the page they're on. Heavy, rarely needed parts (a rich-text editor, maps) are split out separately. Splitting too finely causes request waterfalls and fallback flicker.