title: React-native: Maximum update depth exceeded and Call arrow function as regurlar function
body: <p>first, sorry for my bad English. I'm coding a function and have error: <code>Maximum update depth exceeded</code> <a href="https://i.stack.imgur.com/8Ozga.png" rel="nofollow noreferrer">here is error image</a></p>
  
  <p>This is code cause error:
  I have an arrow function that will change state value after touchable onPress</p>
  
  <pre><code>toggleEdit = () =&gt; {
        setTimeout(() =&gt; {
        this.setState({
            isEdit: !this.state.isEdit
        })}, 150 )
    }
  </code></pre>
  
  <p>This is Render function :</p>
  
  <pre><code>render() {
      return (
        &lt;View style={styles.body}&gt;
          &lt;View style={styles.headerTitle}&gt;
            &lt;View&gt;
              &lt;TouchableOpacity onPress={this.buttonLeft}&gt;
                &lt;Icon
                  name="chevron-left"
                  type="evilicon"
                  color="#FFFFFF"
                  size={calcScale(62)}
                /&gt;
              &lt;/TouchableOpacity&gt;
            &lt;/View&gt;
            &lt;View&gt;
              &lt;Text style={styles.titleFont}&gt;
                {constQuotes.constQuoteAmount.label_title}
              &lt;/Text&gt;
            &lt;/View&gt;
            &lt;View style={{marginLeft: 'auto', marginRight: calcScale(17)}}&gt;
              &lt;TouchableOpacity onPress={this.toggleEdit}&gt;
                &lt;Text style={styles.titleAction}&gt;
                  {!this.state.isEdit ? `Edit` : `Cancel`}
                &lt;/Text&gt;
              &lt;/TouchableOpacity&gt;
            &lt;/View&gt;
          &lt;/View&gt;
        &lt;/View&gt;
      );
    }
  </code></pre>
  
  <p>When I call <strong>toggleEdit</strong> with <code>onPress={this.toggleEdit}</code>, function run ok,
  But I call that with <code>onPress={this.toggleEdit()}</code>:</p>
  
  <pre><code>&lt;View style={{marginLeft: 'auto', marginRight: calcScale(17)}}&gt;
              &lt;TouchableOpacity onPress={this.toggleEdit()}&gt;
                &lt;Text style={styles.titleAction}&gt;
                  {!this.state.isEdit ? `Edit` : `Cancel`}
                &lt;/Text&gt;
              &lt;/TouchableOpacity&gt;
            &lt;/View&gt;
  </code></pre>
  
  <p>I have error <code>Maximum update depth exceeded</code></p>
  
  <p>What is difference between two ways ? Why did I have that error ?
  Please help me, tks so much!</p>