import {StrictMode, Component, ReactNode} from 'react'; import {createRoot} from 'react-dom/client'; import App from './App.tsx'; import './index.css'; class ErrorBoundary extends Component<{children: ReactNode}, {hasError: boolean, error: any}> { constructor(props: any) { super(props); this.state = { hasError: false, error: null }; } static getDerivedStateFromError(error: any) { return { hasError: true, error }; } render() { if (this.state.hasError) { return (

Something went wrong.

{this.state.error?.toString()}
{this.state.error?.stack}
); } return this.props.children; } } createRoot(document.getElementById('root')!).render( , );