Skip to content

Instantly share code, notes, and snippets.

@adhithiravi
Forked from anonymous/fiddle.js
Last active March 17, 2018 04:32
Show Gist options
  • Save adhithiravi/f0daac5ce6fccacfdaa355f5a7522c98 to your computer and use it in GitHub Desktop.
Save adhithiravi/f0daac5ce6fccacfdaa355f5a7522c98 to your computer and use it in GitHub Desktop.
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