Created
January 9, 2016 08:16
-
-
Save takuan-osho/b12c5b440ea67a051e2d to your computer and use it in GitHub Desktop.
JavaScript初心者がES2015をReactとかに適用する時に色々ハマったことのちょっとしたまとめ ref: http://qiita.com/takuan_osho/items/c938ef0d4a7ed11a159f
This file contains hidden or 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 MyComponent = React.createClass({ | |
| getInitialState() { | |
| return { | |
| newTodo: "" | |
| }; | |
| } | |
| }); |
This file contains hidden or 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
| class MyComponent extends React.Component { | |
| constructor() { | |
| super(); | |
| this.state = {newTodo: ""}; | |
| } | |
| } |
This file contains hidden or 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
| 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