Merge pull request #1794 from ONLYOFFICE/feature/update-react

Feature/update react
This commit is contained in:
maxkadushkin 2022-06-09 23:47:46 +03:00 committed by GitHub
commit 2e43d25387
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 27 additions and 19 deletions

View file

@ -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(
<I18nextProvider i18n={i18n}>
<Provider {...stores}>
{/*<Suspense fallback="loading...">*/}
<App />
{/*</Suspense>*/}
</Provider>
</I18nextProvider>,
document.getElementById('app'),
);
</I18nextProvider>
);

View file

@ -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(
<I18nextProvider i18n={i18n}>
<Provider {...stores}>
{/*<Suspense fallback="">*/}
{/*<Suspense fallback="loading...">*/}
<App />
{/*</Suspense>*/}
</Provider>
</I18nextProvider>,
document.getElementById('app'),
);
</I18nextProvider>
);

View file

@ -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(
<I18nextProvider i18n={i18n}>
<Provider {...stores}>
<App />
{/*<Suspense fallback="loading...">*/}
<App />
{/*</Suspense>*/}
</Provider>
</I18nextProvider>,
document.getElementById('app'),
</I18nextProvider>
);

View file

@ -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';

View file

@ -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"