title: React Hook useEffect : fetch data using axios with async await .api calling continuous the same api
body: <p>While I fetch data from <code>API</code> and set the response to a array using <code>useEffect</code>
  it call the <code>API</code> repeat continuous.</p>
  
  <pre><code>let [product, setproduct] = useState([]);
  
  async function fetchData() {
      let response = await axios(
        `api`
      );
      let user = await response.data;
      setproduct(user);
      console.log(product);
    }
  
    useEffect(() =&gt; {
      fetchData();
    }); 
  </code></pre>