Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: React 18 markers #1224

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

BenHodgsonR2R
Copy link

@BenHodgsonR2R BenHodgsonR2R commented May 3, 2024

Issue: (#1223)

This pull request addresses an issue with the markers rendering incorrectly using React ^18.

The issues were:

  1. StrictMode behaves differently, which exposes an issue with the dimensionsCache property in componentWillUnmount.
    https://react.dev/blog/2022/03/29/react-v18#new-strict-mode-behaviors
  2. Batched updates, causing flickering with the markers when the map is repositioned or zoomed. Resolved by opting out of automatic batching for the marker state updates (via flushSync).
    https://react.dev/blog/2022/03/29/react-v18#new-feature-automatic-batching

@AaronLayton
Copy link

+1 👍 for this

@managervcf
Copy link

@itsmichaeldiego This really needs to be merged. Otherwise, this library will naturally die.

@rubberbandage
Copy link

+1 for this to be merged

@Mbes9
Copy link

Mbes9 commented May 15, 2024

+1 to merge this...

@RobotScribe
Copy link

+1

1 similar comment
@maanenh
Copy link

maanenh commented May 20, 2024

+1

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.

None yet

7 participants