Skip to content

Instantly share code, notes, and snippets.

@camkidman
Created January 29, 2016 16:22
Show Gist options
  • Save camkidman/6eb0310121615a2e39e3 to your computer and use it in GitHub Desktop.
Save camkidman/6eb0310121615a2e39e3 to your computer and use it in GitHub Desktop.
render: function() {
return <div className="register-form">
{this.renderForm()}
</div>
},
renderForm: function() {
return <form onSubmit={this.formSubmit}>
<div className="form-group">
<label for="register-email">Email</label>
<input
type="text"
className="form-control"
id="register-email"
placeholder="Email"
value={this.state.email}
onChange={this.handleEmailChange}
/>
</div>
<div className="form-group">
<label for="register-password">Password</label>
<input
type="password"
className="form-control"
id="register-password"
placeholder="Password"
value={this.state.password}
onChange={this.handlePasswordChange}
/>
</div>
<button onClick={this.formSubmit} className="btn btn-success btn-block">{this.props.button}</button>
</form>
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment