From d3d7636b47a88ea2c18e7a9c1465e074db96854b Mon Sep 17 00:00:00 2001 From: SergeyEzhin Date: Thu, 9 Jun 2022 18:11:49 +0400 Subject: [PATCH 1/2] [DE PE SSE mobile] Updated react and react-dom --- apps/documenteditor/mobile/src/app.js | 12 +++++++----- apps/presentationeditor/mobile/src/app.js | 14 ++++++++------ apps/spreadsheeteditor/mobile/src/app.js | 14 +++++++++----- .../mobile/src/view/CellEditor.jsx | 2 +- 4 files changed, 25 insertions(+), 17 deletions(-) diff --git a/apps/documenteditor/mobile/src/app.js b/apps/documenteditor/mobile/src/app.js index 15f74d1bb..49535c3a4 100644 --- a/apps/documenteditor/mobile/src/app.js +++ b/apps/documenteditor/mobile/src/app.js @@ -1,6 +1,6 @@ // Import React and ReactDOM import React, { Suspense } from 'react'; -import ReactDOM from 'react-dom'; +import { createRoot } from 'react-dom/client'; // Import Framework7 import Framework7 from 'framework7/lite-bundle'; @@ -37,17 +37,19 @@ import { Provider } from 'mobx-react' import { stores } from './store/mainStore' import { LocalStorage } from '../../../common/mobile/utils/LocalStorage'; +const container = document.getElementById('app'); +const root = createRoot(container); + // Init F7 React Plugin Framework7.use(Framework7React) // Mount React App -ReactDOM.render( +root.render( {/**/} {/**/} - , - document.getElementById('app'), -); \ No newline at end of file + +); diff --git a/apps/presentationeditor/mobile/src/app.js b/apps/presentationeditor/mobile/src/app.js index f1b43f913..7887217f5 100644 --- a/apps/presentationeditor/mobile/src/app.js +++ b/apps/presentationeditor/mobile/src/app.js @@ -1,6 +1,6 @@ // Import React and ReactDOM import React, { Suspense } from 'react'; -import ReactDOM from 'react-dom'; +import { createRoot } from 'react-dom/client'; // Import Framework7 import Framework7 from 'framework7/lite-bundle'; @@ -32,17 +32,19 @@ import { Provider } from 'mobx-react' import { stores } from './store/mainStore' import { LocalStorage } from '../../../common/mobile/utils/LocalStorage'; +const container = document.getElementById('app'); +const root = createRoot(container); + // Init F7 React Plugin Framework7.use(Framework7React) // Mount React App -ReactDOM.render( +root.render( - {/**/} + {/**/} {/**/} - , - document.getElementById('app'), -); \ No newline at end of file + +); diff --git a/apps/spreadsheeteditor/mobile/src/app.js b/apps/spreadsheeteditor/mobile/src/app.js index 7763b36a8..df2cc1447 100644 --- a/apps/spreadsheeteditor/mobile/src/app.js +++ b/apps/spreadsheeteditor/mobile/src/app.js @@ -1,6 +1,6 @@ // Import React and ReactDOM import React, { Suspense } from 'react'; -import ReactDOM from 'react-dom'; +import { createRoot } from 'react-dom/client'; // Import Framework7 import Framework7 from 'framework7/lite-bundle'; @@ -37,15 +37,19 @@ import { Provider } from 'mobx-react'; import { stores } from './store/mainStore'; import { LocalStorage } from '../../../common/mobile/utils/LocalStorage'; +const container = document.getElementById('app'); +const root = createRoot(container); + // Init F7 React Plugin Framework7.use(Framework7React); // Mount React App -ReactDOM.render( +root.render( - + {/**/} + + {/**/} - , - document.getElementById('app'), + ); \ No newline at end of file diff --git a/apps/spreadsheeteditor/mobile/src/view/CellEditor.jsx b/apps/spreadsheeteditor/mobile/src/view/CellEditor.jsx index 3935e276d..01186e7e1 100644 --- a/apps/spreadsheeteditor/mobile/src/view/CellEditor.jsx +++ b/apps/spreadsheeteditor/mobile/src/view/CellEditor.jsx @@ -2,7 +2,7 @@ import React, { Fragment, useState, useEffect } from 'react'; import { Input, View, Button, Link, Popover, ListItem, List, Icon, f7, Page, Navbar, NavRight } from 'framework7-react'; import {observer, inject} from "mobx-react"; -import { __interactionsRef } from 'scheduler/tracing'; +// import { __interactionsRef } from 'scheduler/tracing'; import { Device } from '../../../../common/mobile/utils/device'; import { useTranslation } from 'react-i18next'; From 6c79e087d7ddc084b89b3754113da5680dc7ec7d Mon Sep 17 00:00:00 2001 From: SergeyEzhin Date: Thu, 9 Jun 2022 18:14:39 +0400 Subject: [PATCH 2/2] Updated package.json --- vendor/framework7-react/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vendor/framework7-react/package.json b/vendor/framework7-react/package.json index 81c6f09ed..c31bad64b 100644 --- a/vendor/framework7-react/package.json +++ b/vendor/framework7-react/package.json @@ -35,8 +35,8 @@ "i18next-fetch-backend": "^3.0.0", "postcss": "^8.4.12", "prop-types": "^15.7.2", - "react": "^17.0.1", - "react-dom": "^17.0.1", + "react": "^18.1.0", + "react-dom": "^18.1.0", "react-i18next": "^11.8.5", "swiper": "^6.4.8", "template7": "^1.4.2"