react 18 createRoot

This commit is contained in:
Michael Peters 2022-10-22 16:59:33 -07:00
parent 9bb13b70c2
commit 6e4a87b528

View File

@ -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(
<RecoilRoot>
<RootElement guildsManager={guildsManager} />
</RecoilRoot>,
document.getElementById('react-root'),
);
})();
});