title: useEffect for componentDidMount dependency
body: <ol>
  <li>I use useEffect for using only once when componentDidMount.</li>
  <li>I reuse <code>requestPatientsApi</code> in the functional component.</li>
  <li>Adding all dependencies in useEffect's second parameter occurs infinity rendering.</li>
  </ol>
  
  <pre><code>  useEffect(() =&gt; {
      requestPatientsApi();
    }, []);
  
    const requestPatientsApi = async (skip: number = 0, limit: number = 100) =&gt; {
      try {
        const { data } = await get&lt;AxiosResponse&lt;PatientApi&gt;&gt;("/patient", { skip, limit, requester: "admin" });
  
        setPager({
          ...pager,
          totalItems: data.totalCount
        });
        props.setPatients(refinedPatients(data.items));
      } catch (err) {
        throw err;
      }
    };
  </code></pre>
  
  <p><strong>1. How to avoid NO.3's infinity rendering?</strong></p>
  
  <p><strong>2. Is there are any ways to reuse <code>requestPatientsApi</code> avoiding NO.3?</strong> </p>