We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents eaec6c6 + bc03fd0 commit 4901a9fCopy full SHA for 4901a9f
src/ReactHTMLElement.ts
@@ -82,7 +82,8 @@ class ReactHTMLElement extends HTMLElement {
82
disconnectedCallback(): void {
83
if (!this._mountPoint) return;
84
85
- this._root?.unmount();
+ // setTimeout to avoid synchronous unmount
86
+ setTimeout(() => this._root?.unmount(), 0);
87
}
88
89
constructor(template = '<div></div>', mountSelector = 'div') {
0 commit comments