From c425e6e44fb855674f7bbeb2715a85bc856cce28 Mon Sep 17 00:00:00 2001 From: nataliauvarova Date: Wed, 6 Sep 2023 10:45:36 +0000 Subject: [PATCH] #971: react 18 --- package-lock.json | 41 +++++++++++++++++++---------------------- package.json | 4 ++-- src/index.js | 21 ++++++++++----------- 3 files changed, 31 insertions(+), 35 deletions(-) diff --git a/package-lock.json b/package-lock.json index 59c04a14..49b53bc1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8478,12 +8478,11 @@ } }, "react": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/react/-/react-17.0.2.tgz", - "integrity": "sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==", + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz", + "integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==", "requires": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1" + "loose-envify": "^1.1.0" } }, "react-autocomplete": { @@ -8579,13 +8578,12 @@ } }, "react-dom": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-17.0.2.tgz", - "integrity": "sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==", + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz", + "integrity": "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==", "requires": { "loose-envify": "^1.1.0", - "object-assign": "^4.1.1", - "scheduler": "^0.20.2" + "scheduler": "^0.23.0" } }, "react-fast-compare": { @@ -8844,11 +8842,11 @@ }, "dependencies": { "@babel/runtime": { - "version": "7.22.0", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.22.0.tgz", - "integrity": "sha512-TT6NB0oszYQ4oxLNUdG+FNHIc3MohXVCKA2BeyQ4WeM2VCSC6wBZ6P0Yfkdzxv+87D8Xk0LJyHeCKlWMvpZt0g==", + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.22.15.tgz", + "integrity": "sha512-T0O+aa+4w0u06iNmapipJXMV4HoUir03hpx3/YqXXhu9xim3w+dVphjFWl1OH8NbZHw5Lbm9k45drDkgq2VNNA==", "requires": { - "regenerator-runtime": "^0.13.11" + "regenerator-runtime": "^0.14.0" } }, "hoist-non-react-statics": { @@ -8857,9 +8855,9 @@ "integrity": "sha512-rqcy4pJo55FTTLWt+bU8ukscqHeE/e9KWvsOW2b/a3afxQZhwkQdT1rPPCJ0rYXdj4vNcasY8zHTH+jF/qStxw==" }, "regenerator-runtime": { - "version": "0.13.11", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", - "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==" + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz", + "integrity": "sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==" }, "symbol-observable": { "version": "4.0.0", @@ -9325,12 +9323,11 @@ "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" }, "scheduler": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.20.2.tgz", - "integrity": "sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==", + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz", + "integrity": "sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==", "requires": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1" + "loose-envify": "^1.1.0" } }, "schema-utils": { diff --git a/package.json b/package.json index 633157cd..cbcfc4b6 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/index.js b/src/index.js index db664aa5..89762ace 100644 --- a/src/index.js +++ b/src/index.js @@ -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"; @@ -42,13 +42,12 @@ window.logger = bindActionCreators( window.dispatch = store.dispatch; -ReactDOM.render( - - - - - - - , - document.getElementById("root") -); +const root = createRoot(document.getElementById("root")); + +root.render( + + + + + +); \ No newline at end of file