Skip to content

Instantly share code, notes, and snippets.

@chaintng
Created October 16, 2016 04:32
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 chaintng/5d8edfba9a13b8770efe321207255e0b to your computer and use it in GitHub Desktop.
Save chaintng/5d8edfba9a13b8770efe321207255e0b to your computer and use it in GitHub Desktop.
react-step-2-3.jsx
var Result = React.createClass({
propTypes: {
filterPokemon: React.PropTypes.array,
},
render: function() {
return (<div>
<div>--- Total Filter Pokemon: {this.props.filterPokemon.length} ---</div>
<ul>
{this.props.filterPokemon.map(function (item, i) {
return <li key={i}>{item.name} (Atk: {item.attack}, Def: {item.defense})</li>
})}
</ul>
</div>);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment