1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- import React, { Component } from 'react';
- import { AppRegistry, Image, StyleSheet, Text, View } from 'react-native';
- const styles = StyleSheet.create({
- container: {
- flex: 1,
- backgroundColor: '#fa4',
- alignItems: 'center',
- justifyContent: 'center',
- },
- });
- class App extends Component {
- render() {
- return (
- <View style={styles.container}>
- <Text>Open up App.js to start working on your app!</Text>
- <Text>Changes you make will automatically reload.</Text>
- <Text>Shake your phone to open the developer menu.</Text>
- </View>
- );
- }
- }
- export default class Bananas extends Component {
- render() {
- const pic = {
- uri: 'https://upload.wikimedia.org/wikipedia/commons/d/de/Bananavarieties.jpg',
- };
- const img = (
- <Image source={pic} style={{
- backgroundColor: 'orange',
- height: 110,
- opacity: 0.9,
- width: '100%',
- }} />
- );
- return (
- img
- );
- }
- }
- // skip this line if using Create React Native App
- // AppRegistry.registerComponent('AwesomeProject', () => Bananas);
|