title: how to render react functional component after interval
body: <pre class="lang-js prettyprint-override"><code>  useEffect(() =&gt; {
      const url = `https://......com/..../${id}`;
      fetch(url)
        .then((res) =&gt; res.json())
        .then((data) =&gt; {
          console.log(serviceDetail);
          setServiceDetail(data);
        });
  </code></pre>
  <p>Note: I want it to render it after a certain time like every 5 seconds.(more or less)</p>