title: React Hook useEffect has missing dependencies question
body: <p>i have this problem:</p>
  <pre><code> Line 25:7:  React Hook useEffect has missing dependencies: 'getSingleProductData', 'isProductOnSale', and 'productData'. Either include them or remove the dependency array  react-hooks/exhaustive-deps
  </code></pre>
  <p>this is the code:</p>
  <pre><code>    type SingleProductParams = {
      s_id:string;
  }
  
  type SingleProductProps = RouteComponentProps&lt;SingleProductParams&gt;
  
  const SingleProduct: React.FC&lt;SingleProductProps&gt; = (props) =&gt; {
      let [productData, setProductData] = useState&lt;Partial&lt;IProdItems&gt;&gt;({});
      let [isProductOnSale, setIsProductOnSale] = useState&lt;Sale['onSale']&gt;();
  
      useEffect( () =&gt; { 
          setIsProductOnSale(productData.sale?.onSale);
          getSingleProductData();
          console.log(productData);
          console.log(isProductOnSale);
          console.log(props.match.params.s_id);
      },[props]) 
      
      const getSingleProductData = async() =&gt; { 
          let url = URL_API + &quot;/products/single/&quot; + props.match.params.s_id;
          let data = await doApiGet(url);
          console.log(data);
          setProductData(data);
      }
  </code></pre>
  <p>how can I fix it? i tried every way from google, that's just doesn't work.
  but the page all work, i get the data and it's all fine.
  should i disable the error?
  I must mention that the console logs inside the useEffect is undefined but the data shown in the site!</p>