Skip to content

Instantly share code, notes, and snippets.

@chihirokaasan
Created December 11, 2015 03:15
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 chihirokaasan/e909fe8ce7f25c39f562 to your computer and use it in GitHub Desktop.
Save chihirokaasan/e909fe8ce7f25c39f562 to your computer and use it in GitHub Desktop.
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'));
document.getElementById('app')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment