const ParentComp = ({}) {
const p_ref = useRef();
return <ChildComp p_ref={p_ref}/>
}
const ChildComp = ({p_ref}) {
return <div ref={p_ref} />
}
I have read somewhere of the forwardRef
of react. Do I need a forwardRef
to do what I am attempting to do, or is it find?
I have tested my code as is, and everything works as expected.