- Catches render errors and shows a styled recovery UI instead of blank white screen - Try Again button re-renders, Reload button refreshes the page - Error details shown in a collapsible pre block - Full i18n support (EN/FR) - Wraps the entire app in main.tsx
14 lines
334 B
TypeScript
14 lines
334 B
TypeScript
import React from 'react'
|
|
import ReactDOM from 'react-dom/client'
|
|
import App from './App'
|
|
import { ErrorBoundary } from './components/ErrorBoundary'
|
|
import './index.css'
|
|
|
|
ReactDOM.createRoot(document.getElementById('root')!).render(
|
|
<React.StrictMode>
|
|
<ErrorBoundary>
|
|
<App />
|
|
</ErrorBoundary>
|
|
</React.StrictMode>,
|
|
)
|