I've seen L.control.layers().removeLayer() but my problem is, when creating a marker through layercontrol, I don't know if it is possible to add a ref to it.
tried looking though the event that is created, the only thing I could find there that is connected to the element created on the DOM is it's z-index, though with react I shouldn't use querySelector.
what I am trying to do is, after two markers were created, if then you try to add another marker it'll delete the first two.
I know I'm missing something and sure it is possible to do, thanks for any help!