Last updated 2 years ago
import { useSlot } from "@atomico/hooks/use-slot";
const optionalFilter = (element)=> element instanceof MyCustomElement; const childNodes = useSlot(ref, optionalFilter);
Where:
ref: Reference of the slot to observe.
ref
childNodes: List of nodes assigned to the observed slot.
childNodes
optionalFilter: allows to filter nodes assign to childNodes
optionalFilter