Skip to content

Instantly share code, notes, and snippets.

@jwo
Created October 21, 2015 17:10
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 jwo/a5a2f78dd2372578dca9 to your computer and use it in GitHub Desktop.
Save jwo/a5a2f78dd2372578dca9 to your computer and use it in GitHub Desktop.
var Numbers = React.createClass({
numbers() {
return [3,4,5];
},
render() {
return <div >
<h1>There are {this.numbers().length} numbers</h1>
{this.numbers().map(function(i){
return <p>There is {i}</p>
})
}
</div>
}
});
React.render(<Numbers></Numbers>, document.body);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment