React · Senior · Question 23 of 75
What happens to an error thrown during render if there's no error boundary above the component?
- ✓Correct answer: React unmounts the whole root tree and reports via
onUncaughtError - 2React shows the nearest
<Suspense>fallback instead of the component - 3React ignores the error and keeps the previous render result
Explanation
An unhandled render error removes the root's entire UI - showing a broken interface is worse than nothing. In React 19, createRoot has onCaughtError and onUncaughtError for logging. That's why boundaries are placed around routes and independent widgets.