My code for a component in React-Native is as follows (please note I am using native-base in case the structure looks weird):
class CardIntInput extends React.Component {
render() {
return (
<Card>
<Form>
<Item regular>
<Label>
{this.props.info}:
</Label>
<Input
keyboardType = 'number-pad'
onChangeText = {(text) => {this.props.data} = text}
/>
</Item>
</Form>
</Card>
)
}
}
Every time I run the code it returns the aforementioned error, which I have isolated to the onChangeText line.
I am pretty new to JS and React Native and I've tried all that I can think of, so I turning to the advice of others.
I hope I'm just forgetting something simple but any advice would be much appreciated