I am using react-leaflet maps, and run-time I have to update the direction of markers, I am using a library of leaflet-rotatedmarker with react-leaflet. markers direction are working fine on load and reload but not updated after receiving values from props.
<Marker
key={1}
position={{ lat: position.latitude, lng: position.longitude }}
rotationAngle={position.course}
rotationOrigin="center"
icon={L.icon({
iconUrl: "xyz.svg",
iconSize: [50,50],
iconAnchor: [25, 25]})}
/>
I just want to update rotationAngle on receiving new angle value.
Please Advise, I don't know how to use setRotationAngle in react-leaflet
Thanks