title: useEffect called twice
body: <p>I know why this happens but want to know what´s the <em>right approach</em> to avoid it.
  useEffect is called twice. one with data = null and then with "real" data.</p>
  
  <pre><code>const [data, setData] = useState(null);
  someServiceToFetchData.then(freshData =&gt; setData(freshData))
  
  useEffect(() =&gt; {
      console.log("useEffect called");
  }, [data]);
  </code></pre>
  
  <p>should I do something like this everywhere?</p>
  
  <pre><code>useEffect(() =&gt; {
      if (data) {
          console.log("useEffect called with real data");
      }
  }, [data]);
  </code></pre>