Last active
January 19, 2016 07:57
-
-
Save sotayamashita/496ee0c28ee253b182a4 to your computer and use it in GitHub Desktop.
What would be the best thing for performance to render using Twitter tweet list page as an example ?
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 React from 'react'; | |
class default TweetList extends React.Component { | |
render() { | |
const Tweet = ({ text }) => ( | |
<div>{text}</div> | |
); | |
const TweetList = () => ( | |
{tweetList.map(tweet => <Tweet key={tweet.id} {...tweet}) />} | |
); | |
return ( | |
<div> | |
{TweetList} | |
</div> | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment