Created
March 17, 2018 03:53
-
-
Save anonymous/a8124590f06d76885ad217dacb362e7e 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 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