I am new to react-native. I am doing a simple salary calculator component for practice. I have two TextInput components, but I can't seem to type anything in them. Here is the code for my component:
class SueldoCalc extends Component {
constructor(props)
{
super(props);
}
calcSalario()
{
console.log("Calculating");
}
render()
{
return (
<View>
<Text>Entre las horas trabajadas:</Text>
<TextInput />
<Text>Entre el rate por hora:</Text>
<TextInput />
<TouchableHighlight onPress={this.calcSalario}>
<Text>Calcular salario...</Text>
</TouchableHighlight>
</View>
);
}
}
I tried subscribing to onTextChange events, but nothing. This is so basic, I can't find anything out there. Please help! I am running the app on Android Simulator for Visual Studio.