Skip to content

Commit 26c90c0

Browse files
committed
chore(website): Use new react 18 createRoot API
1 parent aa654f3 commit 26c90c0

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

website/src/index.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
import 'process';
22
import React from 'react';
3-
import ReactDOM from 'react-dom';
3+
import * as ReactDOMClient from 'react-dom/client';
44
import App from './components/App';
5-
65
import 'codemirror/lib/codemirror.css';
76
import './react-docgen.less';
87

9-
ReactDOM.render(<App />, document.getElementById('root'));
8+
const container = document.getElementById('root');
9+
const root = ReactDOMClient.createRoot(container);
10+
11+
root.render(<App />);

0 commit comments

Comments
 (0)