Skip to content

Instantly share code, notes, and snippets.

@rstormsf
Created August 7, 2015 21:33
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 rstormsf/10de720a8cd51aadd5fa to your computer and use it in GitHub Desktop.
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.
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