Created
November 19, 2015 21:05
-
-
Save heyjohnmurray/3fc9f94d207ebd62a3c1 to your computer and use it in GitHub Desktop.
This file contains 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 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