title: Why when using sort in redux state my component is not updating?
body: <p>I have to sort an array of objects in ascending or descending order and i'm having trouble. My redux state is updating in redux dev tools and all works correctly but it doesn't show my changes on the component, it doesn't re-render.</p>
  <p>Functions:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>const sortAsc = () =&gt; {
      const sortAscending = productsFiltered.sort((a, b) =&gt; a.price - b.price);
      console.log(sortAscending);
      dispatch(sortProducts(sortAscending));
    };
    const sortDesc = () =&gt; {
      const sortDescending = productsFiltered.sort((a, b) =&gt; a.price - b.price).reverse();
      console.log(sortDescending);
      dispatch(sortProducts(sortDescending));
    };
  
  
    &lt;button onClick={sortAsc}&gt;sortAsc&lt;/button&gt;
    &lt;button onClick={sortDesc}&gt;sortDesc&lt;/button&gt;</code></pre>
  </div>
  </div>
  </p>
  <p>Action:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>export const sortProducts = (products) =&gt; {
    return {
      type: ActionTypes.SORT_PRODUCTS,
      payload: products,
    };
  };</code></pre>
  </div>
  </div>
  </p>
  <p>Reducer:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>export const FilterCategoryReducer = (state = [], action) =&gt; {
    switch (action.type) {
      case ActionTypes.FILTER_CATEGORY:
        return { ...state, products: action.payload };
      case ActionTypes.SORT_PRODUCTS:
        return { products: action.payload };
      default:
        return state;
    }
  };</code></pre>
  </div>
  </div>
  </p>