title: I want to store an id to the localStorage each time when a user drag and drops
body: <p>I have two panels. On the left panel I have all the cards with unique id given as id attribute to the div. When a user drag and drops over other panel. I am using the unique id to appendChild on the right side panel, the appending part is working fine. Now I want to store that id in the local Storage so that I can map through them and filter them out from the state which I was using to map all the div cards on left panel and show them on the right panel, so that it would work even if the user refreshes.</p>
  <pre><code>enter code here  const onCardDrop = (e) =&gt; {
  
          const card = e.dataTransfer.getData('card')
          console.log(card)      // card example 37i9dQZF1DX0u8vIGVgue9
  
          e.stopPropagation();
          e.target.appendChild(document.getElementById(card))
          // After this line I want to store the card on local Storage to map the card in future
          // And I want to append the each card id to the local storage to map them easily
          toast();
          let arr;
          
      }
  </code></pre>
  <p>I have tried saving into local Storage writing a long code but it is returning the string and every thing getting messed up</p>