I want print the value which is entered in TextInput to console.
below is snippets from my code:
constructor(props) {
super(props);
this.state= {
textValue: "",
}
}
_textChange = (text) => {
this.setState({
textValue: text,
})
console.log(this.state.textValue);
}
AND:
<TextInput onChange={this._textChange.bind(this)}/>
I know that something is wrong with my code, but I am not able to figure it out. I just want to print the entered text in TextInput to be printed in console
Note
I have seen this answer. I am not able to understand the answers in the given link. I am very new to react-native. So please try to explain it the simple way.