Answer
A Portal renders children into a DOM node outside the parent hierarchy (document.body, a modal root) while keeping them in the React tree for context and event delegation.
Use cases:
- Modals, tooltips, dropdowns that must escape
overflow: hiddenor stacking contexts. - Toasts/notifications mounted at the app root.
- Embedded widgets in legacy DOM containers.
Event bubbling: React events bubble through the React tree, not the DOM tree — a click inside a portal still triggers handlers on ancestors in JSX.