File tree 4 files changed +21
-21
lines changed
4 files changed +21
-21
lines changed Original file line number Diff line number Diff line change 8
8
"preview" : " vite preview"
9
9
},
10
10
"dependencies" : {
11
- "react" : " ^17 .0.2 " ,
12
- "react-dom" : " ^17 .0.2 "
11
+ "react" : " ^18 .0.0 " ,
12
+ "react-dom" : " ^18 .0.0 "
13
13
},
14
14
"devDependencies" : {
15
- "@types/react" : " ^17.0.33 " ,
16
- "@types/react-dom" : " ^17.0.10 " ,
17
- "@vitejs/plugin-react" : " ^1.0.7 " ,
18
- "typescript" : " ^4.5.4 " ,
19
- "vite" : " ^2.9.0 "
15
+ "@types/react" : " ^17.0.43 " ,
16
+ "@types/react-dom" : " ^17.0.14 " ,
17
+ "@vitejs/plugin-react" : " ^1.3.0 " ,
18
+ "typescript" : " ^4.6.3 " ,
19
+ "vite" : " ^2.9.1 "
20
20
}
21
21
}
Original file line number Diff line number Diff line change 1
1
import React from 'react'
2
- import ReactDOM from 'react-dom'
3
- import './index.css'
2
+ import ReactDOM from 'react-dom/client'
4
3
import App from './App'
4
+ import './index.css'
5
5
6
- ReactDOM . render (
6
+ ReactDOM . createRoot ( document . getElementById ( 'root' ) ! ) . render (
7
7
< React . StrictMode >
8
8
< App />
9
- </ React . StrictMode > ,
10
- document . getElementById ( 'root' )
9
+ </ React . StrictMode >
11
10
)
Original file line number Diff line number Diff line change 8
8
"preview" : " vite preview"
9
9
},
10
10
"dependencies" : {
11
- "react" : " ^17 .0.2 " ,
12
- "react-dom" : " ^17 .0.2 "
11
+ "react" : " ^18 .0.0 " ,
12
+ "react-dom" : " ^18 .0.0 "
13
13
},
14
14
"devDependencies" : {
15
- "@vitejs/plugin-react" : " ^1.0.7" ,
16
- "vite" : " ^2.9.0"
15
+ "@types/react" : " ^17.0.43" ,
16
+ "@types/react-dom" : " ^17.0.14" ,
17
+ "@vitejs/plugin-react" : " ^1.3.0" ,
18
+ "vite" : " ^2.9.1"
17
19
}
18
20
}
Original file line number Diff line number Diff line change 1
1
import React from 'react'
2
- import ReactDOM from 'react-dom'
3
- import './index.css'
2
+ import ReactDOM from 'react-dom/client'
4
3
import App from './App'
4
+ import './index.css'
5
5
6
- ReactDOM . render (
6
+ ReactDOM . createRoot ( document . getElementById ( 'root' ) ) . render (
7
7
< React . StrictMode >
8
8
< App />
9
- </ React . StrictMode > ,
10
- document . getElementById ( 'root' )
9
+ </ React . StrictMode >
11
10
)
You can’t perform that action at this time.
0 commit comments