Skip to content

Fix Popup and GeolocateControl under React StrictMode#1836

Merged
Pessimistress merged 2 commits intomasterfrom
x/strictmode
Apr 21, 2022
Merged

Fix Popup and GeolocateControl under React StrictMode#1836
Pessimistress merged 2 commits intomasterfrom
x/strictmode

Conversation

@Pessimistress
Copy link
Copy Markdown
Collaborator

@Pessimistress Pessimistress commented Apr 20, 2022

For #1825

Handle double useEffect calls under strict mode

Change List

  • Popup onOpen fires only once
  • Popup onClose no longer fires if the popup is closed by unmounting
  • GeolocateControl renders correctly in strict mode
  • Clarify callback behavior in Popup's documentation
  • Update the "controls" example to reflect recommended practice
  • Bump mapbox-gl dev dependency to latest

Todo

  • Update React dev dependency to v18

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.

2 participants