-
-
Save adhithiravi/f0daac5ce6fccacfdaa355f5a7522c98 to your computer and use it in GitHub Desktop.
(source: https://jsfiddle.net/b5fr05p4/)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Form extends React.Component { | |
constructor (props) { | |
super(props) | |
this.state = { | |
input: '' | |
} | |
} | |
handleChangeInput = (text) => { | |
this.setState({ input: text }) | |
} | |
render () { | |
const { input } = this.state | |
return ( | |
<View> | |
<TextInput style={{height: 40, borderColor: 'gray', borderWidth: 1}} | |
onChangeText={this.handleChangeInput} | |
value={input} | |
/> | |
</View> | |
) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment