The Google Maps API and React both manipulate the DOM, which can cause
conflicts where Google Maps removes nodes that React still has references
to. Add graceful error handling:
1. Remove async flag from Google Maps script - use defer only
2. Add try-catch in marker update useEffect to ignore removeChild errors
3. Add cleanup function to properly tear down markers on unmount
4. Log warnings instead of crashing when DOM conflicts occur
This allows the app to continue functioning even when there are minor
DOM reconciliation issues between Google Maps and React.
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>