// src/AnalyticsChart.jsx export default function AnalyticsChart() { return

📊 Analytics chart goes here.

; } // src/App.jsx import { lazy, Suspense, useState } from "react"; const AnalyticsChart = lazy(() => import("./AnalyticsChart")); function Dashboard() { const [showChart, setShowChart] = useState(false); return (
{showChart && ( Loading chart...

}>
)}
); } function App() { return ; } export default App; /* Notes: - Before the button is clicked, showChart is false, so React never even attempts to render , meaning lazy()'s dynamic import is never triggered and the chunk is never requested. - Checking the network tab confirms AnalyticsChart's code only appears as a request the moment "Show analytics" is clicked, not on the initial page load. */