Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6290

When we pass ref prop in the parent component and get the prop in child component what is the type of ref in typescript in child component?

$
0
0

const weightRef = useRef(null);

<Parent Component                    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


Viewing all articles
Browse latest Browse all 6290

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>