title: Fetch data from api every second
body: <p>I have a react native app where i am fetching orders made by customer and display them in restaurant side in a specific screen, I am using fetch api to get the data,
  so THE WORKFLOW is customer first place order and store it in database and in the restaurant side i have this function :</p>
  <pre><code>  const loadData = async () =&gt; {
          const response = await fetch(`${API_URL}/getActiveOrders?ID=${id}`);
          const result = await response.json();
          if (result.auth === true) {
  
                  setCurrentOrders(result.data)
  
          } else {
              setCurrentOrders([])
          }
      }
  
      useEffect(() =&gt; {
          const interval = setInterval(() =&gt; {
              loadData();
          }, 1000)
          return () =&gt; clearInterval(interval)
      }, [id]);
  </code></pre>
  <p>as in this function it runs every second and it makes api call to express server to fetch the data from database so i keep restaurant receiving orders without delay. But i noticed that the app is lagging when the interval set to 1 second and it keep making frequent calls to the express server.</p>
  <p><strong>my question:</strong> Is this the best approach  to perform same as this scenario (fetching the orders the moment they been placed by the customer) or Is there a better way to do it without lagging as well as when fetching large data will the performance remain the same or there will be some issues?</p>