Let's get 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";
export default function App({ reactSource, relaySource }) {
return (
<View style={styles.container}>
<Image style={styles.image} source={reactSource} />
<Image style={styles.image} source={relaySource} />
</View>
);
}
const sourceProp = PropTypes.oneOfType([
PropTypes.shape({
uri: PropTypes.string.isRequired
}),
PropTypes.number
]).isRequired;
App.propTypes = {
reactSource: sourceProp,
relaySource: sourceProp
};
App.defaultProps = {
reactSource: {
uri: "https://facebook.github.io/react-native...