React leaflet upgraded to v4, this.ref returns null in class component

102 Views Asked by At

Basically, I have leaflet map, showing a vehicle moving on it. now I have upgraded the leaflet v2 to v4. this.ref and this.ref.leafletElement is undefined. so, I am unable to animate the vehicle icon on map

0

There are 0 best solutions below