title: How can stop infinite loop in useeffect hook
body: <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code> const [list, setlist] = useState([]);
    const token = localStorage.getItem("token");
    const requestOptions = {
      method: "GET",
      headers: { authorization: `Bearer ${token}` },
    };
    useEffect(() =&gt; {
      fetch("http://localhost:3000/recruiter/postedjobs",requestOptions)
        .then((response) =&gt; response.json())
        .then((data) =&gt; {
          setlist(data.data);
        });
    });</code></pre>
  </div>
  </div>
  </p>
  <p>I am working on the react js where i have to show the list of user after the page render so i use the useeffect hook what when i write the useeffect hook it call the api infinite time how  can stop this. if i add the blank dependencies  [] it show requestoptions are missing from dependencies</p>