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

Forward the mapRef back up the chain #158

Closed
wants to merge 1 commit into from

Conversation

markrickert
Copy link

The latest release didn't integrate all the changes I had made to forward the mapRef to the parent component in #152. This PR makes it so that you can access and use the ref property. I've updated the example app to show how to get and use the ref.

This change makes sure that we can still access the inner MapView's ref from the component where we create the ClusteredMapView.

This allows you to call functions on the <ClusteredMapView> like animateToCoordinate, and getCamera.

This makes the example I posted about on #152 work properly. (ping @nikhilkumar6)

This change makes sure that we can still access the MapView ref from the component where we create the ClusterdMapView.

This allows you to call functions on the ClusteredMapView like animateToCoordinate, and getCamera.
@venits
Copy link
Owner

venits commented May 11, 2020

The version 3.3.4 is up with mapRef prop back.

Now both ref and mapRef will work as expected.

I would recommend switching to ref and useRef for more universal code 👍

@venits venits closed this May 11, 2020
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

2 participants