diff --git a/src/client/webapp/preload.tsx b/src/client/webapp/preload.tsx index fc880a8..99ba7b3 100644 --- a/src/client/webapp/preload.tsx +++ b/src/client/webapp/preload.tsx @@ -15,7 +15,7 @@ import Globals from './globals'; import PersonalDB from './personal-db'; import MessageRAMCache from './message-ram-cache'; import ResourceRAMCache from './resource-ram-cache'; -import ReactDOM from 'react-dom'; +import { createRoot } from 'react-dom/client'; import React from 'react'; import RootElement from './elements/root'; import { RecoilRoot } from 'recoil'; @@ -59,11 +59,11 @@ window.addEventListener('DOMContentLoaded', () => { LOG.silly('guildsManager initialized'); - ReactDOM.render( + const root = createRoot(document.getElementById('react-root')!); + root.render( , - document.getElementById('react-root'), - ); + ); })(); });