Hook
usePortalRoot
Returns the document body once the app has mounted so portal components can render safely.
Hook
10
Import
import { usePortalRoot } from "@swirski/ui";Usage
const portalRoot = usePortalRoot();Returns
| Value | Type | Notes |
|---|---|---|
portalRoot | HTMLElement | Root element to use for portals. |