title: How to disable only the setState message warning on react native
body: <p>I want to disable the setState message warning </p>
  
  <p><a href="https://i.stack.imgur.com/sNJiT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sNJiT.png" alt="enter image description here"></a></p>
  
  <p>On the layout 1 :
  My constructor :</p>
  
  <pre><code>constructor(props){
  super(props);
  //Constructeur
  
      this.lestachesitemsRef=getDatabase().ref('n0rhl66bifuq3rejl6118k8ppo/lestaches'); this.lestachesitems=[];
      this.state={
      //Debutdustate
      lestachesSource: new ListView.DataSource({rowHasChanged: (row1, row2)=&gt;row1 !== row2}),
      Prenom: '',
      Nom: '',}
      }
  </code></pre>
  
  <p>My function :</p>
  
  <pre><code>    ajouter= () =&gt; {
   if( (this.state.Nom !== '') &amp;&amp; (this.state.Prenom !== '')) { this.lestachesitemsRef.push({  Nom: this.state.Nom , Prenom: this.state.Prenom , });  this.setState({ Nom : '' }) , this.setState({ Prenom : '' })   } 
  }
  </code></pre>
  
  <p>My componentDidMount</p>
  
  <pre><code> componentDidMount()
      {
      //DidMount
       this.lestachesitemsRef.on('child_added',   (dataSnapshot)=&gt;{ this.lestachesitems.push({id: dataSnapshot.key,   text: dataSnapshot.val()}); this.setState({lestachesSource: this.state.lestachesSource.cloneWithRows(this.lestachesitems)}); });
        this.lestachesitemsRef.on('child_removed', (dataSnapshot)=&gt;{ this.lestachesitems = this.lestachesitems.filter((x)=&gt;x.id !== dataSnapshot.key);  this.setState({ lestachesSource: this.state.lestachesSource.cloneWithRows(this.lestachesitems)});});
      }
  </code></pre>
  
  <p>My vue :</p>
  
  <pre><code>&lt;TextInput style={styles.Dtext} placeholder="Nom" onChangeText={(text) =&gt; this.setState({Nom: text})} value={this.state.Nom}/&gt;
  
  &lt;TextInput style={styles.Dtext} placeholder="Prenom" onChangeText={(text) =&gt; this.setState({Prenom: text})} value={this.state.Prenom}/&gt;
  
  &lt;Button title='Allerlayout2' onPress={() =&gt; this.verl2()} onLongPress={() =&gt; this.infol2()} buttonStyle={ styles.View } icon={{name: 'squirrel', type: 'octicon', buttonStyle: styles.View }}  /&gt;
  &lt;Button title='ajouter' onPress={() =&gt; this.ajouter()} onLongPress={() =&gt; this.infoajout()} buttonStyle={ styles.View } icon={{name: 'squirrel', type: 'octicon', buttonStyle: styles.View }}  /&gt;
  
  &lt;ListView dataSource={this.state.lestachesSource} renderRow={this.renderRowlestaches.bind(this)} enableEmptySections={true} /&gt;
  </code></pre>
  
  <p>The Layout2 the same thing as Layout1.
  Thank you !</p>