title: react useEffect is not running
body: <p>my useEffect was working, but now it isn't.  I have no idea why.  console.log show nothing is getting executed on initial run now.  Code is below.  Its pretty simple code, i was just getting started with functional components.  When InvTable is called, i'm getting a null error inside it because tablesCopy is undefined obviously.</p>
  <pre><code>const App = () =&gt; {
    const [tablesOrig, setTablesOrig] = useState&lt;any&gt;({});
    const [tablesCopy, setTablesCopy] = useState&lt;any&gt;({});
    const [numOfTables, setNumOfTables] = useState&lt;number&gt;(-1);
    const [rowTarget, setRowTarget] = useState&lt;string&gt;(&quot;&quot;);
  
    const setEditRow = (e: React.BaseSyntheticEvent) =&gt; {
      setRowTarget(e.target.id);
      console.log(&quot;setEditRow -&gt; rowTarget&quot;, rowTarget);
    };
  
     
    useEffect(() =&gt; {
      const fetchData = async () =&gt; {
        const path = &quot;/tables.json&quot;;
        console.log(&quot;fetchData -&gt; path&quot;, path);  // &lt;- never executes
        const response = await fetch(path);
        const tables: any = await response.json();
        setTablesOrig(tables);
        setTablesCopy({ ...tables });
        const tableKeys = Object.keys(tablesCopy);
        setNumOfTables(tableKeys.length);
  
      };
      fetchData();
    }, []);
  
      
    return (
      &lt;&gt;
        &lt;InvTable table={tablesCopy[0]} tableId={0} setEditRow={setEditRow} /&gt;
      &lt;/&gt;
    );
  };;
  </code></pre>