Add error boundary to main entry point

cgen-bb18b38c162a4f6899cb2cc5909bd6df
This commit is contained in:
Builder.io 2025-08-06 02:24:18 +00:00
parent 8df3af2408
commit cd32b1bfd3

View file

@ -1,6 +1,7 @@
import { StrictMode } from 'react';
import { createRoot } from 'react-dom/client';
import App from './App';
import ErrorBoundary from './components/ErrorBoundary';
const container = document.getElementById('root');
if (!container) {
@ -10,6 +11,8 @@ if (!container) {
const root = createRoot(container);
root.render(
<StrictMode>
<App />
<ErrorBoundary>
<App />
</ErrorBoundary>
</StrictMode>
);