Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Bar extends React.Component {
- render() {
- const { show = false } = this.state || {}
- return (
- <div>
- <Button onClick={() => this.setState({ show: true }))}>Show</Button>
- <Thing show={show} />
- </div>
- )
- }
- }
Add Comment
Please, Sign In to add comment