title: Why does React Hooks Axios API call return twice?
body: <p>Why does React Hooks Axios API Call return twice.. even with a check if it's loaded? </p>
  
  <p>I am used to this.setState but trying to understand the reason behind this why it's showing up twice inside my console log.</p>
  
  <p>My code:</p>
  
  <pre><code>import React, { useState, useEffect } from "react";
  import axios from "axios";
  
  const App = () =&gt; {
    const [users, setUsers] = useState({ results: [] });
    const [isLoading, setIsLoading] = useState(false);
  
    useEffect(() =&gt; {
      const fetchData = async () =&gt; {
        setIsLoading(true);
  
        await axios
          .get("https://jsonplaceholder.typicode.com/users/")
          .then(result =&gt; setUsers(result));
  
        setIsLoading(false);
      };
  
      fetchData();
    }, []);
  
    console.log(
      users.status === 200 &amp;&amp; users.data.map(name =&gt; console.log(name))
    );
  
    return &lt;h2&gt;App&lt;/h2&gt;;
  };
  
  export default App;
  </code></pre>