( useElement: ElementHook<E, PropsWithoutRef<P>>, )
| 64 | } |
| 65 | |
| 66 | export function createLeafComponent<E, P>( |
| 67 | useElement: ElementHook<E, PropsWithoutRef<P>>, |
| 68 | ) { |
| 69 | function LeafComponent(props: PropsWithoutRef<P>, forwardedRef: Ref<E>) { |
| 70 | const { instance } = useElement(props).current |
| 71 | useImperativeHandle(forwardedRef, () => instance) |
| 72 | |
| 73 | return null |
| 74 | } |
| 75 | |
| 76 | return forwardRef(LeafComponent) |
| 77 | } |
no outgoing calls
no test coverage detected
searching dependent graphs…