File tree 2 files changed +10
-12
lines changed
2 files changed +10
-12
lines changed Original file line number Diff line number Diff line change 1
- import React from "react" ;
2
- import ReactDOM from "react-dom" ;
1
+ import { StrictMode } from "react" ;
2
+ import { createRoot } from "react-dom/client " ;
3
3
import App from "./App" ;
4
4
5
- ReactDOM . render (
6
- < React . StrictMode >
5
+ createRoot ( document . getElementById ( "root" ) ! ) . render (
6
+ < StrictMode >
7
7
< App />
8
- </ React . StrictMode > ,
9
- document . getElementById ( "root" )
8
+ </ StrictMode >
10
9
) ;
Original file line number Diff line number Diff line change 1
- import React from "react" ;
2
- import ReactDOM from "react-dom" ;
1
+ import { StrictMode } from "react" ;
2
+ import { createRoot } from "react-dom/client " ;
3
3
import App from "./App" ;
4
4
5
- ReactDOM . render (
6
- < React . StrictMode >
5
+ createRoot ( document . getElementById ( "root" ) ) . render (
6
+ < StrictMode >
7
7
< App />
8
- </ React . StrictMode > ,
9
- document . getElementById ( "root" )
8
+ </ StrictMode >
10
9
) ;
You can’t perform that action at this time.
0 commit comments