Skip to content

Instantly share code, notes, and snippets.

@heyjohnmurray
Created November 19, 2015 21:05
Show Gist options
  • Save heyjohnmurray/3fc9f94d207ebd62a3c1 to your computer and use it in GitHub Desktop.
Save heyjohnmurray/3fc9f94d207ebd62a3c1 to your computer and use it in GitHub Desktop.
var App = React.createClass({
// get initial state is the key to passing info.
getInitialState: function() {
return {
text: 'this is initial state text'
};
},
render: function() {
return (
// this.state is the key to rendering the info
<h1>{this.state.text}</h1>
);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment