Skip to content

Instantly share code, notes, and snippets.

@TheBrown
Created June 10, 2018 10:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TheBrown/1d4548d5f50c1a7ffbe9309ba4b54e45 to your computer and use it in GitHub Desktop.
Save TheBrown/1d4548d5f50c1a7ffbe9309ba4b54e45 to your computer and use it in GitHub Desktop.
props example
import React, { Component } from 'react';
import { AppRegistry, Image } from 'react-native';
export default class Bananas extends Component {
render() {
let pic = {
uri: 'https://upload.wikimedia.org/wikipedia/commons/d/de/Bananavarieties.jpg'
};
return (
<Image source={pic} style={{width: 193, height: 110}}/>
);
}
}
// skip this line if using Create React Native App
AppRegistry.registerComponent('AwesomeProject', () => Bananas);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment