Problem Statement
What is code splitting and why is it useful?
Explanation
Code splitting divides large bundles into smaller chunks, so only the code needed for a page loads. It reduces initial load time and improves app performance. It’s done using dynamic imports or React.lazy().
Code Solution
SolutionRead Only
const About = React.lazy(() => import('./About'));Practice Sets
This question appears in the following practice sets: