title: Replace using Date.now() inside a reducer
body: <p>Documentation said i should avoid state mutation by using new Date, etc inside reducers. Help me please with advice how should it be done.</p>
  
  <p>Action:</p>
  
  <pre><code>const RECEIVE_PRICES = 'RECEIVE_PRICES';
  
  function receivePrices(prices) {
    return {
      type: RECEIVE_PRICES,
      receivedAt: Date.now(),
      prices,
    };
  }
  </code></pre>
  
  <p>REDUCER:</p>
  
  <pre><code> ...
   case RECEIVE_PRICES: {
        let { prices } = action;
  
        prices = prices.map((p) =&gt; {
          const baseQuote = p.symbol.split('/');
          return { ...p, baseCurrency: baseQuote[0], quoteCurrency: baseQuote[1] };
        });
  
        prices.sort(
          (a, b) =&gt; new Date(a.timestamp).getTime() - new Date(b.timestamp).getTime(),
        );
  
        return {
          ...state,
          prices,
          pricesLoading: false,
          pricesError: null,
        };
      }
      default:
        return state;
    }
  </code></pre>