title: React Hook "useEffect" is called in function "shoes" which is neither a React function component or a custom React Hook
body: <p>I'm getting the following error:</p>
  
  <p><strong>React Hook "useEffect" is called in function "shoes" which is neither a React function component or a custom React Hook function  react-hooks/rules-of-hooks</strong></p>
  
  <p>I'm not sure exactly what is the error in my code:</p>
  
  <pre><code>import React, {useState, useEffect} from 'react';
  import "../App.css"
  
  function shoes() {
      useEffect(() =&gt; {
          fetchItems();
      }, []);
  
      const fetchItems = async () =&gt; {
          const data = await fetch('xxxxxxxxxxxxxxxxxxxxx')
          console.log(data)
      };
  
      return ( &lt; h1 className = "main" &gt; Shoes &lt; /h1&gt; );
      }
  }
  
  export default shoes;
  </code></pre>