package.json: Update to React 18
Update to the new root creation function.
This commit is contained in:
parent
6ece59c917
commit
39e0f576ca
2 changed files with 5 additions and 5 deletions
|
|
@ -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 />);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue