You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unfortunately this way makes the component re-render every time I hover on a diffrent shape. Is there a way I can access the shape's properties in my Control element without using React's state?
Thanks.
The text was updated successfully, but these errors were encountered:
Hi. I have a custom
Control
element in my react-leaflet map that looks like this:I use it to display the name of the geojson shape I'm hovering (a city, a region, a state).
I set
hoveredShape
inside themouseover
event listener:Unfortunately this way makes the component re-render every time I hover on a diffrent shape. Is there a way I can access the shape's properties in my
Control
element without using React's state?Thanks.
The text was updated successfully, but these errors were encountered: