Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
var App = React.createClass({
getInitialState: function(){
return {
active: true
handleClick: function(){
active: !
render: function(){
var buttonSwitch = ? "On" : "Off";
return (
<p>Click the button!</p>
<input type="submit" onClick={this.handleClick} />
React.render(<App />, document.getElementById("app"));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment