6 min read
•Question 28 of 48hardSuspense for Data Fetching
Declarative loading states.
What is Suspense?
Suspense lets components "wait" for something before rendering. It shows a fallback while content is loading.
Use Cases
- Lazy loading components
- Data fetching (with supporting libraries)
- Loading states
Works With
- React.lazy
- Next.js / Remix
- Relay, SWR, React Query