title: How to useEffect when value in localStorage changed?
body: <p>In my react app i'm saving user data filters into localStorage. I want to useEffect, when that data was changed. How to correctly trigger that effect? I tried this:</p>
  
  <pre><code>useEffect(() =&gt; {
      if (rawEstateObjects.length &amp;&amp; localStorage.activeEstateListFilter) {
        const activeFilter = JSON.parse(localStorage.activeEstateListFilter)
        if (activeFilter.length) {
          applyFilter(activeFilter)
        }
      }
    }, [rawEstateObjects, localStorage.activeEstateListFilter])
  </code></pre>
  
  <p>but <code>localStorage.activeEstateListFilter</code> doesn't triggers the effect..</p>