Skip to content

Instantly share code, notes, and snippets.

@adhithiravi
Forked from anonymous/fiddle.js
Created March 17, 2018 03:54
Show Gist options
  • Save adhithiravi/28cf2e8788765fb9f467ed062ea6d063 to your computer and use it in GitHub Desktop.
Save adhithiravi/28cf2e8788765fb9f467ed062ea6d063 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