diff --git a/apps/examples/src/index.tsx b/apps/examples/src/index.tsx index 69873e64f..fc6f9b367 100644 --- a/apps/examples/src/index.tsx +++ b/apps/examples/src/index.tsx @@ -238,16 +238,17 @@ const router = createBrowserRouter([ ...allExamples, ]) -const rootElement = document.getElementById('root') -const root = createRoot(rootElement!) - -root.render( - - } - onError={(error) => console.error(error)} - > - - - -) +document.addEventListener('DOMContentLoaded', () => { + const rootElement = document.getElementById('root')! + const root = createRoot(rootElement!) + root.render( + + } + onError={(error) => console.error(error)} + > + + + + ) +})