React 83 ⚛️ Portals with createPortal
A React component’s DOM output normally lands inside its parent’s DOM element. The component tree and the DOM tree are assumed to mirror each other. Portals break that assumption deliberately. createPortal(children, domNode) renders the children into a DOM node that exists anywhere in the document, while keeping the children in the same position in the…