bradcornford/Googlmapper

DrawingManager Displayed twice based on React-18 upgrade

karamsetty09 opened this issue · 1 comments

Upon upgrading our project to React-18:

Components using

<DrawingManager {props} />

are rendered twice and displaying two DrawingManager's(side by side).

Mainly causing because setMap(map) adds DrawingManager for each render in React 18's cycle of -> mount -> unmount -> mount.

setMap(map)
Parameters:
map: Map
Return Value: None
Attaches the DrawingManager object to the specified Map.

Usual Behavior: Should show only one DrawingManager irrespective of render's

Please let me know if its possible to display - DrawingManager can be limited to display only once.

wronge repo