Skip to content

Instantly share code, notes, and snippets.

Created March 17, 2018 03:53
Show Gist options
  • Save anonymous/a8124590f06d76885ad217dacb362e7e to your computer and use it in GitHub Desktop.
Save anonymous/a8124590f06d76885ad217dacb362e7e 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 style={Styles.row}>
<Text>{'Enter Input'}</Text>
<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