@tom32i
×import React, { Component } from 'react';
import { Text, TextInput, ScrollView, StyleSheet } from 'react-native';
export default class Login extends Component {
// ...
render() {
return (
<ScrollView>
<TextInput onChangeText={email => this.setState({ email })} style={styles.input} />
<TouchableOpacity onPress={this.send} style={styles.button}>
<Text>Log me in</Text>
</TouchableOpacity>
</ScrollView>
);
}
}
// ...
export default class Login extends Component {
static styles = StyleSheet.create({
input: {
padding: 20,
},
button: {
backgroundColor: 'white',
color: 'blue',
},
});
// ...
}
react-native init
react-native start
react-native run-ios
xcodebuild
/ gradle