Closed lluisd closed 6 months ago
@lluisd did you find solution to this?
My map has a markers
prop which I loop to render using the <Marker />
component.
If I change 1 icon (keys are perserved in the .map) then the whole map re-rerender and flickers.
@lluisd did you find solution to this? My map has a
markers
prop which I loop to render using the<Marker />
component. If I change 1 icon (keys are perserved in the .map) then the whole map re-rerender and flickers.
yes, I fixed it by adding the Key attribute with the unique id of my marker/tooltip data. It was my fault being new with React
Bug report in v4
Expected behavior
When markers are redendered with permanent tooltips I don't expect a flickering/flashing tooltip replaced for the new one.
Actual behavior
When markers are redendered the tooltips blink/flicker to be replaced by the new ones.
Steps to reproduce
make some state that rerenders the map with markers with tooltips inside.
live example by selecting some marker which rerenders the markers again and tooltip blinks: https://pumptrackmapapp.azurewebsites.net/
code: https://github.com/lluisd/pumptrack-map/blob/main/components/Map/Map.js