Guest User

Untitled

a guest
Dec 17th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. class Bar extends React.Component {
  2. render() {
  3. const { show = false } = this.state || {}
  4.  
  5. return (
  6. <div>
  7. <Button onClick={() => this.setState({ show: true }))}>Show</Button>
  8. <Thing show={show} />
  9. </div>
  10. )
  11. }
  12. }
Add Comment
Please, Sign In to add comment