title: How to fire onBlur event in React?
body: <p>I have an input field value that I want to format onBlur, here is what my code looks like:</p>
  
  <p><strong>Component</strong>:</p>
  
  <pre><code>  &lt;Input
      onBlur={this.formatEndpoint}
    /&gt;
  </code></pre>
  
  <p><strong>Function</strong>:</p>
  
  <pre><code>  formatEndpoint() {
      let endpoint = this.state.inputEndpoint;
  
      endpoint = endpoint.replace(/\s/g, '').replace(/\/+$/, '');
  
      if (endpoint.slice(-1) === '/') {
        endpoint = endpoint.substring(0, endpoint.length - 1);
      }
  
      console.log('anything');
    }
  </code></pre>
  
  <p>Why doesn't even the <code>console.log()</code> work onBlur? Thanks.</p>