(props: React.HTMLAttributes<HTMLDivElement> & { childDom: HTMLElement })
| 3 | import React from 'react'; |
| 4 | |
| 5 | export default function DomComponent(props: React.HTMLAttributes<HTMLDivElement> & { childDom: HTMLElement }) { |
| 6 | const ref = React.useRef<HTMLDivElement>(null); |
| 7 | React.useEffect(() => { |
| 8 | ref.current.appendChild(props.childDom); |
| 9 | return () => { |
| 10 | $(ref.current).empty(); |
| 11 | }; |
| 12 | }, []); |
| 13 | return <div {...omit(props, 'childDom')} ref={ref}></div>; |
| 14 | } |
nothing calls this directly
no outgoing calls
no test coverage detected