Creating a PostView
At the end of Chapter 5, Third Project - The Facebook Client, we created a FeedListRow
component with a TouchableHighlight
that fired the following function when pressed:
// Friends/app/components/FeedListRow/index.js ... _navigateToPostView () { console.log('pushed'); } ...
We will build a PostView
component that our users will navigate to when the TouchableHighlight
component is pressed in FeedListRow
and replace the current login within this _navigfateToPostView
function to handle that navigation.
This PostView
component should, upon loading, look in AsyncStorage
for this post's details and load them if it exists. If it does not, then it should make a request to the Facebook Graph API for the post's details and save them into AsyncStorage
for future use.
The details that we are interested in, are the post's attachments, comments, and likes. Since each post on Facebook is assigned a unique post ID, we can also save an object...