You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Because the the portal element is appended to the DOM in useEffect, on the initial render, the portal is created in a detached DOM node. It's children render and run their useEffects first, and any access to the DOM will not work.
Describe the bug
Because the the portal element is appended to the DOM in useEffect, on the initial render, the portal is created in a detached DOM node. It's children render and run their useEffects first, and any access to the DOM will not work.
Codesandbox
https://codesandbox.io/s/objective-keldysh-0078v?file=/src/App.js
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The Portal doesn't render the children until it has attached the root element to the DOM
The text was updated successfully, but these errors were encountered: