Loading images

Let's get things started by figuring out how to load images. You can render the <Image> component and pass it properties just like any other React component. But this particular component needs image blob data to be of any use. Let's look at some code:

import React from 'react';import PropTypes from 'prop-types';import { View, Image } from 'react-native';import styles from './styles';// Renders two "<Image>" components, passing the// properties of this component to the "source"// property of each image.const LoadingImages = ({ reactSource, relaySource }) => (  <View style={styles.container}>    <Image style={styles.image} source={reactSource} />    <Image style={styles.image} source={relaySource} />  </View>);// The "source" property ...
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.59.217.167