Skip to content

Instantly share code, notes, and snippets.

@sotayamashita
Last active January 19, 2016 07:57
Show Gist options
  • Save sotayamashita/496ee0c28ee253b182a4 to your computer and use it in GitHub Desktop.
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 ?
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