<ErrorBoundary fallback={<div>Something went terribly wrong</div>}>
<MyComp />
</ErrorBoundary>
If you want to customize the error message, you can pass a function as the fallback prop. The function will be called with the error and a reset function. The reset function will reset the error boundary and re-render the children.