Using React Portals to Render Children Outside the DOM Hierarchy
Say we need to render a child element into a React application. Easy right? That child is mounted to the nearest DOM element and rendered inside of it as a result.
render() { return ( // Child to render inside of the div );
}But! What if we want to render that child outside of the div somewhere else? That could be tricky because it breaks the convention that a component needs to render as a new … Read article
The post Using React Portals to Render Children Outside the DOM Hierarchy appeared first on CSS-Tricks.




