bartoval commented on a change in pull request #1517:
URL: https://github.com/apache/qpid-dispatch/pull/1517#discussion_r807832047



##########
File path: console/react/src/App.js
##########
@@ -28,26 +29,22 @@ import "@patternfly/patternfly/components/Nav/nav.css";
 import { QDRService } from "./common/qdrService";
 import "./App.css";
 import PageLayout from "./overview/dashboard/layout";
-class App extends Component {
-  state = {};
-
-  render() {
-    // service is passed in to make testing easier
-    const service = new QDRService();
-    // also, a router is used here to provide PageLayout with a history 
property
-    return (
-      <Router>
-        <div className="App pf-m-redhat-font">
-          <Route
-            path="/"
-            render={props => (
-              <PageLayout service={service} {...props} 
config={this.props.config} />
-            )}
-          />
-        </div>
-      </Router>
-    );
-  }
+
+function App(props) {
+
+  // service is passed in to make testing easier
+  let service = new QDRService();

Review comment:
       You can safetely use the _const_ keyword instead of _let_ here and in 
line 39.
   `let service = new QDRService();`

##########
File path: console/react/src/App.js
##########
@@ -28,26 +29,22 @@ import "@patternfly/patternfly/components/Nav/nav.css";
 import { QDRService } from "./common/qdrService";
 import "./App.css";
 import PageLayout from "./overview/dashboard/layout";
-class App extends Component {
-  state = {};
-
-  render() {
-    // service is passed in to make testing easier
-    const service = new QDRService();
-    // also, a router is used here to provide PageLayout with a history 
property
-    return (
-      <Router>
-        <div className="App pf-m-redhat-font">
-          <Route
-            path="/"
-            render={props => (
-              <PageLayout service={service} {...props} 
config={this.props.config} />
-            )}
-          />
-        </div>
-      </Router>
-    );
-  }
+
+function App(props) {
+
+  // service is passed in to make testing easier
+  let service = new QDRService();
+
+  // also, a router is used here to provide PageLayout with a history property
+  let history = createHashHistory({ window });
+
+  return (
+    <HistoryRouter history={history}>

Review comment:
       Why we are using HistoryRouter here? Before this refactoring, we used 
the HashRouter.

##########
File path: console/react/package.json
##########
@@ -1,25 +1,25 @@
 {
   "name": "dispatch-console",
-  "version": "1.17.0",
+  "version": "1.19.0",
   "private": true,
   "dependencies": {
-    "@patternfly/patternfly": "^4.125.3",
-    "@patternfly/react-charts": "^6.15.14",
-    "@patternfly/react-core": "^4.147.0",
-    "@patternfly/react-icons": "^4.11.8",
-    "@patternfly/react-styles": "^4.11.8",
-    "@patternfly/react-table": "^4.29.37",
-    "@patternfly/react-topology": "^4.9.42",
+    "@patternfly/patternfly": "^4.171.1",
+    "@patternfly/react-charts": "^6.45.15",
+    "@patternfly/react-core": "^4.192.15",
+    "@patternfly/react-icons": "^4.43.15",
+    "@patternfly/react-styles": "^4.42.15",
+    "@patternfly/react-table": "^4.61.15",
+    "@patternfly/react-topology": "^4.39.15",
     "d3": "^3.5.17",
     "d3-queue": "^3.0.7",
-    "express": "^4.17.1",
+    "express": "^4.17.2",
     "font-awesome": "^4.7.0",
-    "prop-types": "^15.7.2",
+    "prop-types": "^15.8.1",
     "react": "^17.0.2",
     "react-dom": "^17.0.2",
     "react-fontawesome": "^1.7.1",
-    "react-router-dom": "^5.2.0",
-    "rhea": "^2.0.4",
+    "react-router-dom": "^6.2.1",

Review comment:
       That is a breaking change. is it worth changing the library?

##########
File path: console/react/src/overview/dashboard/layout.test.js
##########
@@ -21,6 +21,7 @@ import React from "react";
 import { render } from "@testing-library/react";
 import { service } from "../../serviceTest";
 import PageLayout from "./layout";
+import {MemoryRouter} from "react-router-dom";

Review comment:
       Why we are using MemoryRouter here? 
   I see in the code we use the History Router.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org

Reply via email to