title: Multiple fetch data axios with React Hooks
body: <p>I would like to get global information from Github user and his repos(and get pinned repos will be awesome). I try to make it with async await but It's is correct? I've got 4 times reRender (4 times console log). It is possible to wait all component to reRender when all data is fetched?</p>
  
  <pre class="lang-js prettyprint-override"><code>function App() {
    const [data, setData] = useState(null);
    const [repos, setRepos] = useState(null);
  
    useEffect(() =&gt; {
      const fetchData = async () =&gt; {
        const respGlobal = await axios(`https://api.github.com/users/${username}`);
        const respRepos = await axios(`https://api.github.com/users/${username}/repos`);
  
        setData(respGlobal.data);
        setRepos(respRepos.data);
      };
  
      fetchData()
  
    }, []);
  
    if (data) {
      console.log(data, repos);
    }
  
    return (&lt;h1&gt;Hello&lt;/h1&gt;)
  }
  </code></pre>