Created
April 23, 2018 07:36
-
-
Save eyalcohen4/cf7ec99b5c158f9de8765e00eff0e108 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 WizardContainer extends Component { | |
state = { | |
shouldRenderWizard: true | |
} | |
toggleWizard = () => this.setState(prevState => ({ shouldRednerWizard: !prevState.shouldRenderWizard })); | |
render() { | |
return this.state.shouldRenderWizard ? <Wizard onDismiss={this.toggleWizard} /> : null; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment