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

Defining type for ReactNative composite component

$
0
0

I'm making a composite component. Then I have to define the type of it. For example, here is the sample composite component.

const compositeComponent = ({ text, input }) => {  return (<View><Text {...text}></Text><TextInput {...input} /></View>  );}

What I want is defining the types 'text' and 'input'. But I couldn't get the type of Text and TextInput. How can I get the Text and TextInput tpyes and use it for composite component props type?


Viewing all articles
Browse latest Browse all 6287

Trending Articles