Error: A React component suspended while rendering, but no fallback UI was specified
React JavaScript Framework
Severity: CriticalWhat it means
This error means a component inside your React tree tried to 'suspend' (pause while loading data or code), but there was no Suspense boundary wrapping it to show a fallback loading UI.
React Suspense requires that any component that might suspend must be wrapped in a Suspense component that provides a 'fallback' — something to show while waiting.
Without the fallback, React has no instructions for what to show, and it throws this error.
Affected Models
- React 16.6 and later
- React 18 Suspense for data fetching
- Applications using React.lazy()
Common Causes
- Using React.lazy() to lazy-load a component without wrapping it in a Suspense boundary
- A data-fetching library that uses Suspense (like Relay or React Query in suspense mode) throws a Promise, but there is no Suspense wrapper
- A Suspense boundary exists but the component that suspends is outside it — the boundary must be an ancestor, not a sibling
- Nesting suspending components inside error boundaries that do not also have Suspense wrappers
- Using React 18's use() hook or use(promise) without a parent Suspense boundary
How to Fix It
-
Wrap any React.lazy() import in a Suspense component with a fallback. The fallback can be as simple as a loading spinner or the text 'Loading...'.
Example: const MyPage = React.lazy(() => import('./MyPage')); then in JSX:
Loading...