Does anyone know why the image may not be loading? index.ios.js is below, rest of the code is simply generated from
react-native init TestApp
I am not sure if the opening and closing tags are wrong or what. The image appears to load when I put it into my browser.
import React, { Component } from 'react';
var MOCKED_MOVIES_DATA = [
{title: 'Title', year: '2015', posters: {thumbnail: 'http://i.imgur.com/UePbdph.jpg'}},
];
import {
AppRegistry,
Image,
StyleSheet,
Text,
View
} from 'react-native';
export default class TestApp extends Component {
render() {
var movie = MOCKED_MOVIES_DATA[0];
return (
<View style={styles.container}>
<Text>{movie.title}</Text>
<Text>{movie.year}</Text>
<Image source={{uri: movie.posters.thumbnail}}
style={styles.thumbnail}
/>
</View>
);
}
}
var styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#F5FCFF',
},
thumbnail: {
width: 53,
height: 81,
},
});
AppRegistry.registerComponent('TestApp', () => TestApp);