What happens when an error occurs inside a React component?
function App() {
return (
<ErrorBoundary>
<div>{undefinedVar}</div>
</ErrorBoundary>
);
}
Error caught, fallback UI shown
App crashes
App re-renders
No UI rendered
This question is part of this quiz :
Error Boundary and Debugging in React