title: setState getting updated multiple times
body: <p>I am incrementing a counter by setState() of React using a setInterval method. But for every intervals the application is updating multiple times.</p>
  
  <pre><code>import React, { Component } from 'react';
  
  export default class Arrival extends Component {
  state = {
      count: 0,
      limitTo: 6
    }
    render() {
      try {
        setInterval(() =&gt; {
          this.setState({
            limitTo: this.state.limitTo + 6
          })
          console.log(this.state)
        }, 5000);
      } catch(err) {
        console.log(err)
      }
    return()
  }
  }
  </code></pre>
  
  <p>In the first 5 seconds, the state is getting updated once.</p>
  
  <p>In the next 5 seconds, the state is getting updated 2 times.</p>
  
  <p>In the next 5 seconds, the state is getting updated 4 times. and so on...</p>
  
  <p>I want the state to only get updated once every 5 seconds.</p>