title: React: Handling Events - parameter visibility
body: <p>I am following React Doc. In '<a href="https://reactjs.org/docs/handling-events.html" rel="nofollow noreferrer">Handling Events</a>' section, the below code segment is there.</p>
  
  
  
  <pre class="lang-js prettyprint-override"><code>class Toggle extends React.Component {
    constructor(props) {
      super(props);
      this.state = {isToggleOn: true};
  
      // This binding is necessary to make `this` work in the callback
      this.handleClick = this.handleClick.bind(this);
    }
  
    handleClick() {
      this.setState(state =&gt; ({
        isToggleOn: !state.isToggleOn
      }));
    }
  
    render() {
      return (
        &lt;button onClick={this.handleClick}&gt;
          {this.state.isToggleOn ? 'ON' : 'OFF'}
        &lt;/button&gt;
      );
    }
  }
  
  ReactDOM.render(
    &lt;Toggle /&gt;,
    document.getElementById('root')
  );
  </code></pre>
  
  <p>in <code>handleClick()</code> function, how <code>state</code> is available for it to access? Why not <code>this.state</code>?</p>