title: State returning empty array
body: <p>I'm trying to access state from useState hook but it is giving me the initial state even after I have modified it.</p>
  
  <pre class="lang-js prettyprint-override"><code>const quotesURL = "https://gist.githubusercontent.com/camperbot/5a022b72e96c4c9585c32bf6a75f62d9/raw/e3c6895ce42069f0ee7e991229064f167fe8ccdc/quotes.json";
  
  
  function QuoteGenerator() {
    const [quotes, setQuotes] = useState([]);
    const [currentQuote, setCurrentQuote] = useState({ quote: "", author: "" });
  
    useEffect(() =&gt; {
      axios(quotesURL)
        .then(result =&gt; {
          console.log(result);
          setQuotes(result.data);
        })
        .then(() =&gt; {
  
          console.log(quotes);
        });
      }, []);
  
  </code></pre>
  
  <p>console.log(quotes) is returning empty array instead of array of objects</p>