Created
December 11, 2016 18:52
-
-
Save thiagoa/0165c9a9c25b43c484f40b5f0fcdfa1d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import parseOneTweet from 'app/twitter/parseOneTweet'; // Add this line | |
| import renderOneTweet from 'app/twitter/renderOneTweet'; | |
| import fetchTimeline from 'app/twitter/fetchTimeline'; | |
| export default function mountComponent(opts) { | |
| const containerNode = opts.containerNode; | |
| function renderTweets(response) { | |
| const html = response | |
| .tweets | |
| .map(tweet => parseOneTweet(tweet)) // Add this line | |
| .map(tweet => renderOneTweet(tweet)); | |
| containerNode.innerHTML = html; | |
| } | |
| fetchTimeline('thiagoaraujos').then(renderTweets); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment