Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
function dateDisplay(d) {
return d.getFullYear();
var DateYear = React.createClass({
render: function() {
return (
<p>{dateDisplay(new Date())}</p>
// id='app'に<DateYear />を埋め込む(マウント)
var m = React.render(<DateYear />, document.getElementById('app'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment