useParentElement

grabs the above element of what ever the current element is

Demo

Open console to see parent element

Usage

const const parent: Element | undefinedparent = useParentElement<Element>(): Element | undefineduseParentElement()