Created
October 16, 2016 04:32
-
-
Save chaintng/5d8edfba9a13b8770efe321207255e0b to your computer and use it in GitHub Desktop.
react-step-2-3.jsx
This file contains 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
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