title: React native performance issue
body: <p>I am using coincap api's to first fetch Data of about 1500+ crypto currency and then Web-socket to update the updated value of crypto Currency. </p>
  
  <p>I a using redux to manage my state here</p>
  
  <p>Inside My <code>componentDidMount()</code>, I am calling a <strong>redux action</strong> <code>fetchCoin</code> which fetches the value of the coin </p>
  
  <pre><code>componentDidMount() {
      this.props.fetchCoin()
    }
  </code></pre>
  
  <p>And then In <code>return</code> I am doing something like this </p>
  
  <pre><code> &lt;FlatList
             data={this.state.searchCoin ? displaySearchCrypto : this.props.cryptoLoaded}
             renderItem={({ item }) =&gt; (
             &lt;CoinCard
                key={item["short"]}
                coinShortName = {item["short"]}
                coinName = {item["long"]}
                coinPrice = {item["price"].toFixed(2)}
                percentChange = {item["perc"].toFixed(2)}
                /&gt;
  </code></pre>
  
  <p>Then I have a web-socket which updates the value of cryptocurrency like this </p>
  
  <pre><code> componentDidUpdate() {
      if (this.state.updateCoinData || this.updateCoinData.length &lt; 1 ) {
        this.updateCoinData = [...this.props.cryptoLoaded];
       this.setState({updateCoinData: true})
      }
        this.socket.on('trades', (tradeMsg) =&gt; {
        for (let i=0; i&lt; this.updateCoinData.length; i++) {
  
          if (this.updateCoinData[i]["short"] == tradeMsg.coin ) {
  
          //Search for changed Crypto Value
         this.updateCoinData[i]["perc"] = tradeMsg["message"]["msg"]["perc"]
         this.updateCoinData[i]["price"] = tradeMsg['message']['msg']['price']
  
          //Update the crypto Value state in Redux
          this.props.updateCrypto(this.updateCoinData);
  
            }
          }
        })
    }
  </code></pre>
  
  <p>Now, While this work, the problem is that this is slowing my app like hell since whenever the socket sends new data, it has to render every component and hence events like touch and search takes lot of time to execute. <strong>[Update]</strong> It turns out my app is rendering something even If i remove socket connection, <strong>check out update 2</strong> </p>
  
  <p><strong>[Question:]</strong> What should I do so that I can improve the performance of App? (Something like not using state or using DOM to update my app and so on). </p>
  
  <p><strong>[Update 1:]</strong> I am using https://github.com/irohitb/Crypto
  And these two are js files where all the logic is happening 
  <a href="https://github.com/irohitb/Crypto/blob/master/src/container/cryptoContainer.js" rel="nofollow noreferrer">https://github.com/irohitb/Crypto/blob/master/src/container/cryptoContainer.js</a>
  <a href="https://github.com/irohitb/Crypto/blob/master/src/components/CoinCard.js" rel="nofollow noreferrer">https://github.com/irohitb/Crypto/blob/master/src/components/CoinCard.js</a>
  I have also move from map to Flatlist. </p>
  
  <p><strong>[Update: 2]</strong> I found that there are <strong>endless render happening</strong> inside my App which is probably keeping my thread busy (<strong>I mean it is endless &amp; unnecessarily passing props</strong>). I asked the same question on separate <a href="https://stackoverflow.com/questions/52213596/infinite-render-in-react">Stackoverflow thread</a> but didn't received a proper response and since it is related to performance, I thought about putting a bounty on it here.</p>
  
  <p>Please check this thread: <a href="https://stackoverflow.com/questions/52213596/infinite-render-in-react">infinite Render in React</a></p>
  
  <p><strong>[Answer Update:]</strong> While there are many great answers here, Just in case someone wants to understand how it worked, You could probably clone my repository and go back to <strong>before</strong> this <a href="https://github.com/irohitb/Crypto/commit/f395c7cda912599049d3448204a2b8a5660d6cb0" rel="nofollow noreferrer">commit</a>. I have linked the commit to the point where my problems was solved (so you might need to go back and see what I was doing wrong). Also, All the answers were very useful and not hard to comprehend so you should definitely go through them. </p>