The canonical way of using React Native is apparently with JSX:
render: function() {
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}} />
</View>
);
}
How would I do this using JavaScript only? Typically in normal React, React.createElement('div')
would work as an alternative to JSX, but I get an error "null is not a function" when trying to run my iOS React Native app.