title: React hooks - Remove multi object from array and update state
body: <p>How to delete multiple objects of array  and update the state?
  I have selected multiple items from checkbox 
  This is the selected item [5, 4, 3]
  I want to remove all items in array based on id and update the state
  This is my code</p>
  
  <pre><code> const [products, setProducts] = useState();
  
   const DeleteProducts = () =&gt; {
    const selectedItems = [5, 4, 3];
  
      selectedItems.forEach(function(p) {
        setProducts(products.filter(prd =&gt; prd.id !== p));
      });
  }
  </code></pre>
  
  <p>Its removing only one item at time, but I selected 3 items. How to show remaining items except 3 selected items in products state?
  Thanks</p>