Skip to content

Commit

Permalink
package.json: Update to React 18
Browse files Browse the repository at this point in the history
Update to the new root creation function.
  • Loading branch information
martinpitt committed Jul 18, 2023
1 parent 6ece59c commit 39e0f57
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"@patternfly/react-core": "5.0.0-alpha.115",
"@patternfly/react-styles": "5.0.0-alpha.16",
"@patternfly/react-icons": "5.0.0-alpha.19",
"react": "17.0.2",
"react-dom": "17.0.2"
"react": "18.2.0",
"react-dom": "18.2.0"
}
}
6 changes: 3 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 />);
});

0 comments on commit 39e0f57

Please sign in to comment.