Comment on page
use-parent
Retrieve a node higher than the current webcomponent.
import { useParent, useParentPath } from "@atomico/hooks/use-parent";
const selector = "form";
const parent = useParent(selector);
Where:
parent
:Element
, ascending search result according to selector.
const parents = useParentPath(composed?: boolean);
Where:
parents:
parent nodes of the webcomponentcomposed
: bypasses shadow DOM in parent capture.
Last modified 1yr ago