Skip to content

Commit

Permalink
Merge pull request #1026 from nataliauvarova/staging
Browse files Browse the repository at this point in the history
#971: Transition frontend to React 18, update dependencies
  • Loading branch information
nataliauvarova authored Sep 6, 2023
2 parents 74429d2 + c425e6e commit 9c65d8e
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 35 deletions.
41 changes: 19 additions & 22 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@
"lodash": "^4.17.21",
"moment": "^2.29.2",
"plotly.js": "^2.20.0",
"react": "^17.0.2",
"react": "^18.2.0",
"react-autocomplete": "^1.8.1",
"react-datepicker": "^4.7.0",
"react-dom": "^17.0.2",
"react-dom": "^18.2.0",
"react-plotly.js": "^2.6.0",
"react-redux": "^8.0.0",
"react-router-dom": "^6.3.0",
Expand Down
21 changes: 10 additions & 11 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import { Provider } from "react-redux";
import { BrowserRouter } from "react-router-dom";
import ReactDOM from "react-dom";
import { createRoot } from 'react-dom/client';
import { ApolloProvider } from "@apollo/client";
import { applyMiddleware, bindActionCreators, compose, createStore } from "redux";
import createSagaMiddleware from "redux-saga";
Expand Down Expand Up @@ -42,13 +42,12 @@ window.logger = bindActionCreators(

window.dispatch = store.dispatch;

ReactDOM.render(
<Provider store={store}>
<ApolloProvider client={apollo}>
<BrowserRouter>
<Layout />
</BrowserRouter>
</ApolloProvider>
</Provider>,
document.getElementById("root")
);
const root = createRoot(document.getElementById("root"));

root.render(<Provider store={store}>
<ApolloProvider client={apollo}>
<BrowserRouter>
<Layout />
</BrowserRouter>
</ApolloProvider>
</Provider>);

0 comments on commit 9c65d8e

Please sign in to comment.