Merge pull request #23 from jhalitaksoy/fix/migrate-to-react18
migrate to react18 (use createRoot)
This commit is contained in:
commit
4c414481b7
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 { initContext } from './context/context';
|
||||||
|
|
||||||
import Home from './routes/Home';
|
|
||||||
|
|
||||||
initContext();
|
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