Skip to content

Commit 52ea157

Browse files
feat: update to React 18
1 parent 5ea4034 commit 52ea157

File tree

3 files changed

+12622
-12221
lines changed

3 files changed

+12622
-12221
lines changed

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@
2121
"lodash": "^4.17.21",
2222
"popper.js": "^1.16.1",
2323
"prop-types": "15.8.1",
24-
"react": "17.0.1",
24+
"react": "18.3.1",
2525
"react-bootstrap-typeahead": "6.3.2",
2626
"react-chartjs-2": "^2.8.0",
27-
"react-dom": "17.0.1",
27+
"react-dom": "18.3.1",
2828
"react-google-recaptcha": "^3.1.0",
2929
"react-helmet": "^6.1.0",
3030
"react-redux": "8.0.5",

src/index.jsx

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import { render } from 'react-dom';
2+
import { createRoot } from 'react-dom';
33
import { install } from 'ga-gtag';
44
import trackingId from './GoogleAnalytics/googleAnalytics';
55
import App from './App/App';
@@ -8,7 +8,9 @@ import './sass/main.scss';
88

99
install(trackingId());
1010

11-
render(<App />, document.getElementById('root'));
11+
const container = document.getElementById('root');
12+
const root = createRoot(container);
13+
root.render(<App />);
1214

1315
// If you want your app to work offline and load faster, you can change
1416
// unregister() to register() below. Note this comes with some pitfalls.

0 commit comments

Comments
 (0)