Skip to content

Instantly share code, notes, and snippets.

@PeteTheHeat
Created February 22, 2019 18:14
Show Gist options
  • Save PeteTheHeat/52aef6290850b9840342e884325bdd0a to your computer and use it in GitHub Desktop.
Save PeteTheHeat/52aef6290850b9840342e884325bdd0a to your computer and use it in GitHub Desktop.
/**
* 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