Im having an issue in react-leaflet when i try to use an eventHandlers in the popups my logic is that i want when i hover on the marker it opens a popup and when i hover out the popup it turn to closed but it didnt work and this is my code :
<Marker
position={stream.coordinate}
key={stream.id}
eventHandlers={{
mouseover: (e) => {
e.target.openPopup();
},
mouseout: (e) => {
setTimeout(() => {
e.target.closePopup();
}, 1000);
},
click: (e) => {
setDisplayRoute(true);
setSelected(stream.id);
},
}}
>
<Popup
eventHandlers={{
mouseover: (e) => {
e.target.openPopup();
},
mouseout: (e) => {
e.target.closePopup();
},
}}
>