package.json: Update to React 18

Update to the new root creation function.
This commit is contained in:
Martin Pitt 2023-07-18 05:30:11 +02:00 committed by Martin Pitt
parent 6ece59c917
commit 39e0f576ca
2 changed files with 5 additions and 5 deletions

View file

@ -21,10 +21,10 @@ import "cockpit-dark-theme";
import "patternfly/patternfly-5-cockpit.scss";
import React from 'react';
import ReactDOM from 'react-dom';
import { createRoot } from 'react-dom/client';
import { Application } from './app.jsx';
import './app.scss';
document.addEventListener("DOMContentLoaded", function () {
ReactDOM.render(React.createElement(Application, {}), document.getElementById('app'));
document.addEventListener("DOMContentLoaded", () => {
createRoot(document.getElementById("app")).render(<Application />);
});