Skip to content

Commit 7b40bf4

Browse files
committed
Update index.jsx
- Fix: Import createRoot from "react-dom/client"
1 parent 29a39ee commit 7b40bf4

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/index.jsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
import React from 'react';
2-
import ReactDOM from 'react-dom';
2+
import ReactDOM from 'react-dom/client';
33
import './index.css';
44
import App from './App';
55

6-
ReactDOM.createRoot(document.getElementById('root')).render(
6+
const root = ReactDOM.createRoot(document.getElementById('root'));
7+
8+
root.render(
79
<React.StrictMode>
810
<App />
911
</React.StrictMode>
10-
)
12+
);

0 commit comments

Comments
 (0)