Skip to content

Instantly share code, notes, and snippets.

@eyalcohen4
Created April 23, 2018 07:36
Show Gist options
  • Save eyalcohen4/cf7ec99b5c158f9de8765e00eff0e108 to your computer and use it in GitHub Desktop.
Save eyalcohen4/cf7ec99b5c158f9de8765e00eff0e108 to your computer and use it in GitHub Desktop.
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