Last active
April 30, 2017 23:15
-
-
Save geetotes/8745ef0a5410d74f8525a41e557a4d1a to your computer and use it in GitHub Desktop.
This file contains hidden or 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
class Step1 extends React.Component { | |
constructor(props) { | |
super(props); | |
// Bindings for form fields would go here, | |
// and state would keep track of field input | |
} | |
_validate() { | |
// a sanitized version of state can be passed instead | |
this.props.afterValid(this.state) | |
} | |
render() { | |
if (this.props.currentStep !== 1) { | |
return null; | |
} | |
return( | |
<form> | |
// Form fields would go here | |
<button onClick={this._validate} /> | |
</form> | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment