Skip to content

Instantly share code, notes, and snippets.

@takuan-osho
Created January 9, 2016 08:16
Show Gist options
  • Select an option

  • Save takuan-osho/b12c5b440ea67a051e2d to your computer and use it in GitHub Desktop.

Select an option

Save takuan-osho/b12c5b440ea67a051e2d to your computer and use it in GitHub Desktop.
JavaScript初心者がES2015をReactとかに適用する時に色々ハマったことのちょっとしたまとめ ref: http://qiita.com/takuan_osho/items/c938ef0d4a7ed11a159f
var MyComponent = React.createClass({
getInitialState() {
return {
newTodo: ""
};
}
});
class MyComponent extends React.Component {
constructor() {
super();
this.state = {newTodo: ""};
}
}
class TodoFooter extends Component {
constructor {
super();
this.handleClearCompleted = this.handleClearCompleted.bind(this);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment