Phase 8 · React
TopicsPortals
Part of the Frontend Developer Roadmap.
Summary
`createPortal` renders a component's children into a DOM node outside its parent hierarchy — the standard way to build modals, tooltips and dropdowns that need to escape overflow/z-index constraints.
How to Learn This
- 1Build a modal component using `createPortal` into a `#modal-root` div.
- 2Notice that events still bubble through the React tree, not the DOM tree.
- 3Compare a portal-based modal to one nested normally to see the z-index/overflow issues it solves.
More topics in React
Stuck on this topic? Ask an Insider
Get 1:1 guidance from people who've walked this exact path — free on the InsideEdge app.