Bettina Helgenlechner
hallo@bettina.tech
render() { return ReactDOM.createPortal( this.props.children, container ); }
render() { return this.props.children; }
When a child needs to visually break out of its container:
An event fired from inside a portal will propagate to ancestors in the containing React tree, even if those elements are not ancestors in the DOM tree.
By Bettina Helgenlechner