I am finding I have to create a useEffect to render the map so it fits the markers. But with this library, I would have expected the map to automatically handle this.
useEffect(
function fitMarkers() {
if (dataCoords?.length) {
mapRef.current?.fitToCoordinates(dataCoords);
}
},
[dataCoords, insets.top, currentSnapIndex, insets.bottom]
);
Likely the package would have an effect like this behind the scene, but I just want to double check what the expectations are around this.