Created
February 22, 2019 18:14
-
-
Save PeteTheHeat/52aef6290850b9840342e884325bdd0a to your computer and use it in GitHub Desktop.
This file contains hidden or 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
/** | |
* Copyright 2004-present Facebook. All Rights Reserved. | |
* | |
* @flow strict-local | |
* @format | |
*/ | |
'use strict'; | |
import {StyleSheet, TextInput, SafeAreaView} from 'react-native'; | |
import * as React from 'react'; | |
class Playground extends React.Component<any> { | |
state = { | |
text1: 'Trial1', | |
text2: 'Trial2', | |
}; | |
render() { | |
return ( | |
<SafeAreaView style={styles.container}> | |
<TextInput | |
value={this.state.text1} | |
onChange={event => { | |
this.setState({ | |
text1: event.nativeEvent.text, | |
}); | |
}} | |
/> | |
<TextInput | |
value={this.state.text2} | |
onChange={event => { | |
this.setState({ | |
text2: event.nativeEvent.text, | |
}); | |
}} | |
/> | |
</SafeAreaView> | |
); | |
} | |
} | |
const styles = StyleSheet.create({ | |
container: { | |
backgroundColor: 'white', | |
padding: 10, | |
paddingTop: 30, | |
}, | |
}); | |
export default Playground; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment