In start i have define the useRef Hook and then i have passed ref variable to ref prop in the child component form the parent component.
const weightRef = useRef<TextInput>(null);
<ChildComponent
name={"weight"}
ref={weightRef}
/>
export interface TextInputProps {
name:"string";
ref?: any; //Here what is the type of ref for now i have used any
}
I need correct type of ref instead of any