0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-01-06 20:40:08 -05:00

fix(ui,console,demo-app): update react render method (#1750)

update react root render method
This commit is contained in:
simeng-li 2022-08-08 17:31:37 +08:00 committed by GitHub
parent d2b3e33330
commit 4b972f2e23
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 6 deletions

View file

@ -1,8 +1,9 @@
import ReactDOM from 'react-dom';
import { createRoot } from 'react-dom/client';
import ReactModal from 'react-modal';
import App from './App';
const app = document.querySelector('#app');
const root = app && createRoot(app);
ReactModal.setAppElement('#app');
ReactDOM.render(<App />, app);
root?.render(<App />);

View file

@ -1,8 +1,9 @@
import ReactDOM from 'react-dom';
import { createRoot } from 'react-dom/client';
// eslint-disable-next-line import/no-unassigned-import
import '@logto/shared/declaration';
import App from './App';
const app = document.querySelector('#app');
ReactDOM.render(<App />, app);
const root = app && createRoot(app);
root?.render(<App />);

View file

@ -1,6 +1,7 @@
import ReactDOM from 'react-dom';
import { createRoot } from 'react-dom/client';
import App from './App';
const app = document.querySelector('#app');
ReactDOM.render(<App />, app);
const root = app && createRoot(app);
root?.render(<App />);