I made a form with Formik and react-reaflet, when the user clicks on the button, a map appears with a predefined longitude and latitude and he can navigate on the map and automatically change its location by dragging the cursor.
The functionality works as expected but when I click on the cursor to change the location, React shows me in the console this error Warning: Cannot update a component (Main) while rendering a different component (Formik).. I tried to solve it but it still doesn't work. I created this sandbox so you can see how the error appears on the console