title: Redux find changes in prevState and currentState
body: <p>I am creating a crypto ticker App (using websocket form Socket.io) where I store all the crypto coin details in redux store. </p>
  
  <p>The websocket gives me just the data of the coin whose value have changed, After receiving this data, I dispatch an action which update the redux store with that new value of coin. </p>
  
  <pre><code> componentDidUpdate() {
      var socket = openSocket('https://coincap.io');
      var updateCoinData = [...this.props.cryptoLoaded]; //
      let refinedData = {}
       socket.on('trades', (tradeMsg) =&gt; {  
        for (let i=0; i&lt;updateCoinData.length; i++) {
  
          if (updateCoinData[i]["short"] == tradeMsg.coin ) {  
            console.log(tradeMsg.coin)                      
          //Search for changed Crypto Value 
  
          updateCoinData[i]["perc"] = tradeMsg["message"]["msg"]["perc"]
          updateCoinData[i]['price'] = tradeMsg['message']['msg']['price']
  
  
          //Update the crypto Value state in Redux
          this.props.updateCrypto(updateCoinData);
          console.log("we are inside websocket")
            }
          }
       })
    }
  </code></pre>
  
  <p>For which I dispatch an action and then in reducer update the state like this </p>
  
  <pre><code>export default function(state = initialState, action) {
  
    switch(action.type) {
      case CRYPTO_FETCHING:
      return {
        ...state,
        itemsSomething: action.payload
      }
      case CRYPTO_FETCH_SUCESS:
        return {
          ...state,
          itemsSucess: action.payload
        }
        case CRYPTO_DATA_FAIL:
        return {
        ...state,
        itemsFail: action.payload
      }
      case UPDATE_CRYPTO_DATA:
      return {
      ...state,
      itemsSucess: action.payload
      }
      default:
        return state
    }
  }
  </code></pre>
  
  <p>Now, I want to highlight the coins whose value have changed (maybe make the text bold, or change the background) for which I need to compare my previous state with new state. </p>
  
  <p>How can I achieve that?</p>