Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumReactlazy and SuspenseSingle-choice MCQ

You lazy-load a tab panel. When the user switches to it, the spinner flashes, but you'd prefer to keep showing the old tab's content until the new one is ready. Which API does this, instead of falling back to the Suspense spinner?

const [tab, setTab] = useState('home'); // switching tabs mounts a different lazy component under one Suspense