Fix React 18 support

This commit is contained in:
Kevin Kandlbinder 2022-05-03 19:01:24 +02:00
parent 275765e7e1
commit 9ae40093e1
2 changed files with 9 additions and 6 deletions

View file

@ -1,6 +1,6 @@
{ {
"name": "kevins-data-toolbox", "name": "kevins-data-toolbox",
"version": "2.3.0", "version": "2.3.1",
"private": true, "private": true,
"dependencies": { "dependencies": {
"@loadable/component": "^5.15.0", "@loadable/component": "^5.15.0",

View file

@ -1,5 +1,5 @@
import React from 'react'; import React from 'react';
import ReactDOM from 'react-dom'; import { createRoot } from 'react-dom/client';
import './index.scss'; import './index.scss';
import App from './App'; import App from './App';
import reportWebVitals from './reportWebVitals'; import reportWebVitals from './reportWebVitals';
@ -9,12 +9,15 @@ import './i18n';
serviceWorkerRegistration.register(); serviceWorkerRegistration.register();
ReactDOM.render( const root = createRoot(
document.getElementById('root')!
);
root.render(
<React.StrictMode> <React.StrictMode>
<App /> <App />
</React.StrictMode>, </React.StrictMode>
document.getElementById('root') )
);
// If you want to start measuring performance in your app, pass a function // If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log)) // to log results (for example: reportWebVitals(console.log))