Skip to content

Instantly share code, notes, and snippets.

@tonysherbondy
Created November 9, 2016 22:19
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 tonysherbondy/ea8003d76b5c1aa75641c950d5ca88bb to your computer and use it in GitHub Desktop.
Save tonysherbondy/ea8003d76b5c1aa75641c950d5ca88bb to your computer and use it in GitHub Desktop.
// 2.2
import { AppRegistry } from 'react-native'
import App from './App.react'
AppRegistry.registerComponent('YOUR_PROJECT_NAME', () => App)
// 4.2
propTypes = {
post: PropTypes.shape({
imageURL: PropTypes.string.isRequired,
caption: PropTypes.string.isRequired,
})
}
// 4.3
const rows = json.response.posts.map(post => ({
caption: post.caption,
imageURL: post.photos[0].original_size.url,
}))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment