Skip to content

Conversation

@usefulthink
Copy link
Contributor

@usefulthink usefulthink commented Feb 11, 2025

fixes #573

@usefulthink usefulthink changed the title docs: update example in readme. docs: update example in readme Feb 11, 2025
@deAtog
Copy link

deAtog commented Feb 18, 2025

You should have included the examples I provided for setZoom and setCenter as they demonstrate how to respond to changes in the zoom and center properties passed to the component. Without those, the center and zoom will not be updated if those properties change.

@usefulthink
Copy link
Contributor Author

@deAtog that is a good point, but I wanted to keep the example as simple as possible.

Also, handling properties like that can get quite complicated if you want to do it right, so my recommendation at that point would be to use our @vis.gl/react-google-maps library instead of writing your own.

@usefulthink usefulthink merged commit 0f9d68b into main Feb 18, 2025
13 checks passed
@usefulthink usefulthink deleted the usefulthink-patch-1 branch February 18, 2025 18:22
github-actions bot pushed a commit that referenced this pull request Feb 18, 2025
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.

Example useEffect cleanup function?

3 participants