title: setState a CSV file once return null
body: <p>i need to read from a csv file with d3 and store the result in a state variable.
  I separated the iniziatization in a useEffect Hook but when i try tu use the state variable after it return null:</p>
  <pre><code>const ItalyMapRegion = ({ w, h, onChangeRegion }) =&gt; {
  
    const [zone, setZone] = useState(null);
  
    useEffect(() =&gt; {
      console.log(&quot;once&quot;);
      d3.csv(data).then(function (data) {
        setZone(data);
      });
    }, []);
  
    useEffect(() =&gt; {
      console.log(zone); //this return null, why?
          ......
  </code></pre>
  <p>What am i doing wrong?</p>