import React from "react"; import {useErrorBoundary} from "react-error-boundary"; /** * A simple demo failing component. */ export function DemoFailingComponent() { throw new Error("Proudly thrown error."); return (
I will never be shown...
); } /** * A simple demo reset component. */ export function DemoResetComponent() { // Get error boundary. const errorBoundary = useErrorBoundary(); return ( ); }