Skip to content

Commit 9e64ba5

Browse files
renovate[bot]renovate-botwKovacs64
authored
perf(deps): update react monorepo to v18 (major) (#292)
* chore(deps): update react monorepo to v18 * chore(deps): update app to React 18 Co-authored-by: Renovate Bot <[email protected]> Co-authored-by: Justin Hall <[email protected]>
1 parent d7000de commit 9e64ba5

File tree

3 files changed

+52
-56
lines changed

3 files changed

+52
-56
lines changed

package-lock.json

+43-49
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@
5353
"@types/ms": "0.7.31",
5454
"@types/node": "16.11.27",
5555
"@types/node-fetch": "2.6.1",
56-
"@types/react": "17.0.44",
57-
"@types/react-dom": "17.0.15",
56+
"@types/react": "18.0.6",
57+
"@types/react-dom": "18.0.2",
5858
"@types/react-helmet": "6.1.5",
5959
"@vitejs/plugin-react": "1.3.1",
6060
"@wkovacs64/prettier-config": "3.0.1",
@@ -83,8 +83,8 @@
8383
"prettier": "2.6.2",
8484
"prettier-plugin-tailwindcss": "0.1.10",
8585
"prop-types": "15.8.1",
86-
"react": "17.0.2",
87-
"react-dom": "17.0.2",
86+
"react": "18.0.0",
87+
"react-dom": "18.0.0",
8888
"react-helmet": "6.1.0",
8989
"react-icons": "4.3.1",
9090
"react-router-dom": "6.3.0",

src/main.tsx

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
import * as React from 'react';
2-
import ReactDOM from 'react-dom';
2+
import { createRoot } from 'react-dom/client';
33
import App from './app';
44
import AppProviders from './app-providers';
55

66
if (typeof window !== 'undefined') {
77
import('./pwa');
88
}
99

10-
ReactDOM.render(
10+
const container = document.getElementById('root');
11+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
12+
const root = createRoot(container!);
13+
root.render(
1114
<React.StrictMode>
1215
<AppProviders>
1316
<App />
1417
</AppProviders>
1518
</React.StrictMode>,
16-
document.getElementById('root'),
1719
);

0 commit comments

Comments
 (0)