import React, {Component} from 'react';
import {AppRegistry, View} from 'react-native';
class HelloAndroid extends Component {
render() {
return (
<View>
<View style={{width: 100, height: 100, backgroundColor: 'black'}}/>
<View style={{width: 200, height: 200, backgroundColor: 'red'}}/>
<View style={{width: 300, height: 300, backgroundColor: 'blue'}}/>
</View>
);
}
}
AppRegistry.registerComponent('HelloAndroid', () => HelloAndroid);
运行结果: