Static
getCatches exceptions generated in descendant components. Unhandled exceptions will cause the entire component tree to unmount.
Called immediately after a component is mounted. Setting state here will trigger re-rendering.
Called immediately before a component is destroyed. Perform any necessary cleanup in this method, such as
cancelled network requests, or cleaning up any DOM elements created in componentDidMount
.
Global error boundary component that catches all unhandled errors and rejections