Skip to content

Commit

Permalink
fix(ui,console,demo-app): update react render method (#1750)
Browse files Browse the repository at this point in the history
update react root render method
  • Loading branch information
simeng-li authored Aug 8, 2022
1 parent d2b3e33 commit 4b972f2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
5 changes: 3 additions & 2 deletions packages/console/src/index.tsx
Original file line number Diff line number Diff line change
@@ -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 />);
5 changes: 3 additions & 2 deletions packages/demo-app/src/index.tsx
Original file line number Diff line number Diff line change
@@ -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 />);
5 changes: 3 additions & 2 deletions packages/ui/src/index.tsx
Original file line number Diff line number Diff line change
@@ -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 />);

0 comments on commit 4b972f2

Please sign in to comment.