Call an ES6 Arrow function from another function in React
<p>I have an Arrow function to show the validation of form fields as:</p>

<pre><code>showValidation = (field) =&gt; () =&gt; {
    console.log(field);
    this.setFieldState(field, {showValidation: true});

  }
</code></pre>

<p>Now I want to call to function from another function that loops through all the form entries as:</p>

<pre><code>showAllValidations() {
    let self = this;
    for (let field of ['a', 'b', 'c', 'd', 'e', 'f', 'g']) {
      console.log(field);
      self.showValidation(field);
    }
  }
</code></pre>

<p>The <code>console.log(field)</code> in <code>showValidation</code> doesn't print anything  while the <code>console.log(field)</code> in <code>showAllValidations()</code> displays all the fields so I assume that it is not getting called. I am new to ReactJs &amp; ES6 and stuck with this problem for a long time. </p>