React Storefront
|

ErrorBoundary

An internal component that catches errors durring rendering, sets the error, stack, and page properties of the app state accordingly, and calls the registered error reporter if one is configured.

Import
import ErrorBoundary from 'react-storefront/ErrorBoundary'

Props

NameTypeDefaultDescription
onErrorfuncFunction.prototype

A function to call whenever an error occurs. The function is passed an object with error (the error message) and stack (the stack trace as a string).