title: setState method causes "Warning: setState(...): Can only update a mounted or mounting component.." error
body: <p>In following code <code>cityNameLength</code> is a number and represent the length of the name of one city.
  My goal is to render multiple elements based on <code>cityNameLength</code> value.
  So if <code>cityNameLength</code> is equal to 5 I'd like to have 5 <code>span</code> elements.</p>
  
  <p>This is what I've have:  </p>
  
  <pre><code>class myCitiesClass extends Component {
    constructor(props) {
        super(props);
        this.state = {cLength: 0};
        this.setState({ cLength: this.props.cityNameLength });
    }
  
  
    renderDivs() { 
      var products = []
  
      var cNameLength = this.state.cLength
      for (var p = 0; p &lt; cNameLength; p++){
        products.push( &lt;span className='indent' key={p}&gt;{p}&lt;/span&gt; );
      }
      return products
    }
  
    render() {    
      return (
        &lt;View&gt;
          &lt;Text&gt;City name length: {this.props.cityNameLength}&lt;/Text&gt;
          &lt;View&gt;{this.renderDivs()}&lt;/View&gt;
        &lt;/View&gt;
      );
    }
  }
  </code></pre>
  
  <p>This is the error I get:</p>
  
  <pre><code>Warning: setState(...): Can only update a mounted or mounting component. This usually means you called setState() on an unmounted component. This is a no-op.
  </code></pre>