'How to get react leaflet marker latlng when moving it?

I want to get latlng of my marker, after I move it, because in future I will set up fixed markers, and I need to get accurate positions for them, using temporary marker, move it and check it's position. But since my whole component is a class, I cannot use most things I looked up online. For now it just displays map center coordinates. Also, I thought of using RxJS but I have no idea how to check like "move" marker event and send it's position to a paragraph.

<p style={{ color: "white" }}>
    latitude: {position.lat}, longitude: {position.lng}{" "}
</p>

Here is the code

https://pastebin.com/wEgkNaf1


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source