title: ReactJS - Elegant way to toggle state
body: <p>I have a simple show / hide style that needs to toggle on a click event. Here is what I have:</p>
  
  <pre><code>  constructor(props) {
      super(props);
      this.state = {iover: 'hide'}
    }
  
    handleClick(event) {  
      // this is wrong, it returns a true or false    
      this.setState({ iover: !this.state.iover });
      // this doesn't toggle
      // this.setState({ iover: this.state.iover = 'hide' ? this.state.iover = 'show' : this.state.iover ='hide' });
      event.preventDefault()
  }
  </code></pre>
  
  <p>I want to toggle this.state.iover value between 'show' &amp; 'hide'.</p>
  
  <p>What would be the most elegant way to do so.</p>