title: useEffect causing infinite looping with constant dependency
body: <p><code>useEffect</code> is getting triggered even though the dependency array has constant object.</p>
  
  <p>I tried extracting the logic and put the object in <code>useState</code></p>
  
  <pre class="lang-js prettyprint-override"><code>const payload = {
      limit: 5,
      offset: 0,
      filterBy: 'All',
  };
  
  useEffect(() =&gt; {
      const defaultPayload = {
          limit: 10,
          offset: 0,
          filterBy: 'All',
      };
          dispatch({ type: RANDOM_CONST, payload: payload || defaultPayload });
  }, [dispatch, payload]);
  </code></pre>
  
  <p>It should trigger only when <code>payload</code> changes. Since, <code>payload</code> is a constant, it should just run once and note infinite times.</p>