import { storiesOf } from '@storybook/react'; import React from 'react'; import { useError } from '../src'; import ShowDocs from './util/ShowDocs'; class ErrorBoundary extends React.Component<{}, { hasError: boolean }> { constructor(props) { super(props); this.state = { hasError: false }; } static getDerivedStateFromError(error) { return { hasError: true }; } render() { if (this.state.hasError) { return (