File tree Expand file tree Collapse file tree 3 files changed +6918
-7398
lines changed Expand file tree Collapse file tree 3 files changed +6918
-7398
lines changed Original file line number Diff line number Diff line change 3
3
"version" : " 0.1.0" ,
4
4
"private" : true ,
5
5
"dependencies" : {
6
- "react" : " ^16.8.6 " ,
7
- "react-dom" : " ^16.8.6 " ,
8
- "react-scripts" : " 3 .0.0 "
6
+ "react" : " ^18.2.0 " ,
7
+ "react-dom" : " ^18.2.0 " ,
8
+ "react-scripts" : " ^5 .0.1 "
9
9
},
10
10
"scripts" : {
11
11
"start" : " react-scripts start" ,
Original file line number Diff line number Diff line change 1
1
import React from 'react' ;
2
- import ReactDOM from 'react-dom' ;
2
+ import ReactDOM from 'react-dom/client ' ;
3
3
import './index.css' ;
4
4
import App from './App' ;
5
- import * as serviceWorker from './serviceWorker' ;
6
5
7
- ReactDOM . render ( < App /> , document . getElementById ( 'root' ) ) ;
6
+ const root = ReactDOM . createRoot ( document . getElementById ( 'root' ) ) ;
8
7
9
- // If you want your app to work offline and load faster, you can change
10
- // unregister() to register() below. Note this comes with some pitfalls.
11
- // Learn more about service workers: https://bit.ly/CRA-PWA
12
- serviceWorker . unregister ( ) ;
8
+ root . render (
9
+ < React . StrictMode >
10
+ < App />
11
+ </ React . StrictMode >
12
+ ) ;
You can’t perform that action at this time.
0 commit comments