title: Javascript Promise understanding
body: <p>Here's my code for downloading file using RNFetchBlob in React Native.</p>
  
  <pre><code>  let thumbs = []
    for (let i = 0; i &lt; count; i += 1) {
      thumbs.push(this.downloadThumb(this.state.thumbs[skip + i]))
    }
    Promise.all(thumbs)
      .then(data =&gt; {
        this.setState({
          totalCount: this.state.totalMarkerCount,
          fetchedCount: skip + count
        })
        this.recursive_thumb(skip + count, count)
      })
      .catch(reason =&gt; {
        this.recursive_thumb(skip + count, count)
        this.setState({
          totalCount: this.state.totalMarkerCount,
          fetchedCount: skip + count
        })
      })
  </code></pre>
  
  <p>I have used Promise.all for check whether downloading is finished or not.</p>
  
  <p>And does this code above works like thread? or normal ?</p>
  
  <p>If it's not thread, is there anyway to use Thread in React Native.</p>
  
  <p>DownloadThumb function is promise function.</p>