const UserInput: React.FunctionComponent<{ text: string, onChange (text: string): void}> = (props, userContent: any) => {
console.log('12345', userContent.Content) // Only returns undefined if userContent is after props
return (
<View>
<TextInput
value={props.text}
mode='outlined'
placeholder={'Text'}
onChangeText={props.onChange}
/>
</View>
);
}
I want it so that when I console.log, it comes back with something not undefined. If I put userContent first in the props, it works fine but the then everything in FunctionComponenet doesn't work. Any ideas? I've tried quite a lot of different ways but can't figure it out.