migrate to react18 (use createRoot)
This commit is contained in:
parent
872ee11d49
commit
661fc64924
12
src/App.tsx
12
src/App.tsx
@ -1,9 +1,9 @@
|
||||
import * as React from 'react';
|
||||
import { render } from 'react-dom';
|
||||
import { initContext } from './context/context';
|
||||
|
||||
import Home from './routes/Home';
|
||||
|
||||
initContext();
|
||||
|
||||
render(<Home />, document.getElementById('main'));
|
||||
import * as React from 'react';
|
||||
import { createRoot } from 'react-dom/client';
|
||||
const container = document.getElementById('main');
|
||||
const root = createRoot(container!);
|
||||
import Home from './routes/Home';
|
||||
root.render(<Home/>);
|
||||
Loading…
Reference in New Issue
Block a user