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:
parent
d2b3e33330
commit
4b972f2e23
3 changed files with 9 additions and 6 deletions
|
@ -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 />);
|
||||
|
|
|
@ -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 />);
|
||||
|
|
|
@ -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 />);
|
||||
|
|
Loading…
Reference in a new issue