mirror of
https://github.com/streetwriters/notesnook.git
synced 2026-09-01 19:49:54 +02:00
editor: fix queueMicrotask causing hang
This commit is contained in:
@@ -44,11 +44,9 @@ export class PortalProviderAPI extends EventDispatcher<Portals> {
|
||||
}
|
||||
|
||||
render(Component: FunctionComponent, container: HTMLElement) {
|
||||
queueMicrotask(() => {
|
||||
const root = this.roots.get(container) || createRoot(container);
|
||||
flushSync(() => root.render(<Component />));
|
||||
this.roots.set(container, root);
|
||||
});
|
||||
const root = this.roots.get(container) || createRoot(container);
|
||||
flushSync(() => root.render(<Component />));
|
||||
this.roots.set(container, root);
|
||||
}
|
||||
|
||||
remove(container: HTMLElement) {
|
||||
|
||||
Reference in New Issue
Block a user