Created
August 7, 2015 21:33
-
-
Save rstormsf/10de720a8cd51aadd5fa to your computer and use it in GitHub Desktop.
RailsConf 2015 - React.js on Rails - fix on getInitialState when using ES6 classes.
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 TodoList extends React.Component { | |
constructor(props) { | |
super(props); | |
this.state = {name: "nope"}; | |
} | |
render() { | |
return ( | |
<ul> | |
<li>Updated</li> | |
<li id='status'>{this.props.name}</li> | |
</ul>) | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment