You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[EuiPortal] Migrate from class to function component #9456
EuiPortal is a utility component that renders children into a DOM node outside the parent hierarchy. It's used internally by every overlay component (popover, modal, flyout, tooltip).
File:components/portal/portal.tsx
Class size: 72 lines
State:portalNode: HTMLDivElement | null
Lifecycle:componentDidMount, componentWillUnmount
Migration notes:
Straightforward conversion. Mount/unmount logic maps directly to a useEffect cleanup pattern. State becomes useState. No getDerivedStateFromProps or performance-sensitive lifecycle.
Acceptance criteria:
Convert to function component with hooks (useState, useEffect)
Maintain identical DOM insertion/removal behavior
All existing tests pass
No regressions in components that depend on EuiPortal (modal, flyout, popover, tooltip)
Activity