Skip to content

Conversation

@yulinscottkang
Copy link
Contributor

@yulinscottkang yulinscottkang commented Jul 3, 2023

  • Fixes Doubled canvas and container #160

  • Root cause: useEffect is executed twice in development in React 18's strict mode to detect impure functions, causing atlas.Map to initialize twice.

  • Use useRef to ensure atlas.Map is initialized only once between component mount/unmount.

@yulinscottkang yulinscottkang merged commit 7249cec into Azure:master Jul 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Doubled canvas and container

2 participants