Components that have substantial state and internal functionality should be wrapped in an [Error Boundary](https://reactjs.org/docs/error-boundaries.html). This allows for catching unexpected errors and displaying a fallback UI.
Components that are stateless views are unlikely to throw exceptions and don't require an error boundary.
The `ComponentError` component is a pre-built error state that can be used to display an error message and a bug reporting button.
### Example
```tsx
import { ErrorBoundary } from 'react-error-boundary';
We use [Storybook](https://storybook.js.org/) to create a component library where we can see and interact with each component.
Make sure to include a `.stories.tsx` file with each (exported) component you create, and to update the stories file when making changes to existing components.
You can run the Storybook server locally with `npm run storybook`.