diff --git a/src/index.tsx b/src/index.tsx index ccaefc5..c0bdf16 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -65,18 +65,26 @@ export const clientSupport = new ApolloClient({ cache: new InMemoryCache(), }); -ReactDOMClient.createRoot(document.querySelector('#app') as HTMLElement).render( - - - - - - - - - - -); +let root: ReactDOMClient.Root | null = null; + +document.addEventListener('DOMContentLoaded', () => { + if (!root) { + root = ReactDOMClient.createRoot(document.querySelector('#app') as HTMLElement); + + root.render( + + + + + + + + + + + ) + } +}); // If you want to start measuring performance in your app, pass a function // to log results (for example: reportWebVitals(console.log))