Skip to content

Instantly share code, notes, and snippets.

@codeaholicguy
Created March 3, 2016 03:08
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 codeaholicguy/5fd15974edfdb3073ffb to your computer and use it in GitHub Desktop.
Save codeaholicguy/5fd15974edfdb3073ffb to your computer and use it in GitHub Desktop.
var text = "Click the button";
var Form = React.createClass({
render: function(){
return (
<div>
<h3>{this.props.text}</h3>
<input type="submit" />
</div>
);
}
});
var App = React.createClass({
render: function(){
return (
<div>
<h1> Welcome to my app!</h1>
<Form text={this.props.text}/>
</div>
);
}
});
React.render(<App text={text}/>, document.getElementById("app"));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment