react 18 createRoot
This commit is contained in:
parent
9bb13b70c2
commit
6e4a87b528
@ -15,7 +15,7 @@ import Globals from './globals';
|
|||||||
import PersonalDB from './personal-db';
|
import PersonalDB from './personal-db';
|
||||||
import MessageRAMCache from './message-ram-cache';
|
import MessageRAMCache from './message-ram-cache';
|
||||||
import ResourceRAMCache from './resource-ram-cache';
|
import ResourceRAMCache from './resource-ram-cache';
|
||||||
import ReactDOM from 'react-dom';
|
import { createRoot } from 'react-dom/client';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import RootElement from './elements/root';
|
import RootElement from './elements/root';
|
||||||
import { RecoilRoot } from 'recoil';
|
import { RecoilRoot } from 'recoil';
|
||||||
@ -59,11 +59,11 @@ window.addEventListener('DOMContentLoaded', () => {
|
|||||||
|
|
||||||
LOG.silly('guildsManager initialized');
|
LOG.silly('guildsManager initialized');
|
||||||
|
|
||||||
ReactDOM.render(
|
const root = createRoot(document.getElementById('react-root')!);
|
||||||
|
root.render(
|
||||||
<RecoilRoot>
|
<RecoilRoot>
|
||||||
<RootElement guildsManager={guildsManager} />
|
<RootElement guildsManager={guildsManager} />
|
||||||
</RecoilRoot>,
|
</RecoilRoot>,
|
||||||
document.getElementById('react-root'),
|
);
|
||||||
);
|
|
||||||
})();
|
})();
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user