Skip to content

Commit ed4888a

Browse files
committed
website: support react 18.
1 parent 1d9e520 commit ed4888a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

website/index.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
import React from 'react';
2-
import ReactDOM from 'react-dom';
31
import App from './App';
2+
import { createRoot } from 'react-dom/client';
43

5-
ReactDOM.render(<App />, document.getElementById('root'));
4+
const container = document.getElementById('root');
5+
const root = createRoot(container!);
6+
root.render(<App />);

0 commit comments

Comments
 (0)