1import React, { lazy } from 'react';
2
3const HeavyChart = lazy(() => import('./HeavyChart'));
4
5function Dashboard() {
6 return (
7 <div>
8 <h1>Dashboard</h1>
9 <HeavyChart data={chartData} />
10 </div>
11 );
12}
no lines flagged
#050PracticeEasy8 min · 50 XP
Missing Suspense Boundary for React.lazy
A lazily loaded component crashes the entire page tree instead of showing a loading state when the chunk is still downloading.
Flagged linesNo lines flagged yet
What's wrong?
Flag a line or write a note to submit.