title: React-TypeScript: Expected 0 arguments, but got 1
body: <p>I'm not sure why I got this error. So basically I'm dispatching the id from Product component to getProduct redux action. Not sure why it isnt working.</p>
  <p>// The product component</p>
  <pre><code>    const Product: React.FC = () =&gt; {
         const { id } = useParams();
      
         const dispatch = useDispatch();
         useEffect(() =&gt; {
            dispatch(getProduct(id));
         }, [dispatch, id]);
      
         return (
            &lt;section className=&quot;product&quot;&gt;
               &lt;div className=&quot;bd-container product-container&quot;&gt;&lt;/div&gt;
            &lt;/section&gt;
         );
      };
  export default Product;
  </code></pre>
  <p>// getProduct redux action</p>
  <pre><code>interface productId {
     id: string | undefined;
  }
  export const getProduct =
     (id: productId) =&gt; async (dispatch: Dispatch&lt;Actions&gt;) =&gt; {
        dispatch({
           type: actionTypes.GET_PRODUCT_LOADING,
        });
  
        try {
           const { data } = await axios.get(`${url}/api/products/${id}`);
           dispatch({
              type: actionTypes.GET_PRODUCT_SUCCESS,
              payload: data,
           });
        } catch (error: any) {
           dispatch({
              type: actionTypes.GET_PRODUCT_FAIL,
              payload: error,
           });
        }
     };
  </code></pre>