Complete the code to import the error boundary component from React.
import { [1] } from 'react';
The ErrorBoundary component is imported from React to catch errors in child components.
Complete the code to reset the error boundary state using the reset function.
function handleReset() {
[1]();
}The reset function is called to clear the error state and retry rendering.
Fix the error in the error boundary usage by completing the prop name for reset handler.
<ErrorBoundary [1]={handleReset}>
<ChildComponent />
</ErrorBoundary>The correct prop to handle reset in ErrorBoundary is onReset.
Fill both blanks to correctly use the error boundary with reset and fallback UI.
return ( <ErrorBoundary fallback=[1] [2]={handleReset} > <Component /> </ErrorBoundary> );
The fallback prop takes a React element like <ErrorFallback />, and onReset handles the reset event.
Fill all three blanks to implement error recovery with reset in Next.js.
import { ErrorBoundary } from 'react'; function App() { function handleReset() { [1](); } return ( <ErrorBoundary fallback=[2] [3]={handleReset} > <MainComponent /> </ErrorBoundary> ); }
Use reset() to clear errors, pass a fallback UI component like <ErrorFallback />, and handle reset with onReset.