title: Can two arrays be compared in componentWillReceiveProps react method?
body: <p>I was searching for some react projects examples and  i have found some here
  <a href="https://reactjs.org/community/examples.html" rel="nofollow noreferrer">https://reactjs.org/community/examples.html</a></p>
  
  <p>One of them is a shopping cart project, i checked the code and i have found something that i could not understand, comparing two arrays in <code>componentWillReceiveProps</code> method.</p>
  
  <p>I know that comparing two arrays always will return <code>false</code> and this was the source of confusion, here</p>
  
  <p><a href="https://github.com/jeffersonRibeiro/react-shopping-cart/blob/master/src/components/Shelf/index.js" rel="nofollow noreferrer">https://github.com/jeffersonRibeiro/react-shopping-cart/blob/master/src/components/Shelf/index.js</a></p>
  
  <p>My problem is in this part</p>
  
  <pre><code> if (nextFilters !== this.props.filters) {
        this.handleFetchProducts(nextFilters, undefined);
      }
  </code></pre>
  
  <p>Since <code>filters</code> is an array as shown in <code>propTypes</code>.</p>
  
  <p>Everything works well, and this what made me ask the question.</p>
  
  <p>So what is the deal here, is <code>componentWillReceiveProps</code> is a special method so it can make at least a shallow compare between two arrays or what exactly is happening here???</p>