title: React useState loading not changing
body: <p>I run into errors attempting to display data that has not been fetched yet, so.. I want to display loading until the data is fetched, but my 'setIsLoading' always returns false even when it's set to true.</p>
  <p>Am I missing something really obvious? I'm fairly fresh to hooks.</p>
  <pre><code>const Pokedex = () =&gt; {
    const [data, setData] = useState({});
    const [isLoading, setIsLoading] = useState(false);
    const pokemonId = 1;
  
    useEffect(() =&gt; {
      const fetchData = async () =&gt; {
        setIsLoading(true);
        const result = await axios(
          `https://pokeapi.co/api/v2/pokemon/${pokemonId}`
        );
  
        setData(result.data);
      };
  
      fetchData();
      setIsLoading(false);
    }, [pokemonId]);
  
    console.log(&quot;loading: &quot;, isLoading);
  </code></pre>