-
-
Notifications
You must be signed in to change notification settings - Fork 850
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 error in clusterMaxZoomLevel on new arch #3541
Conversation
@janicduplessis thanks that is great. One approach I was experimenting with is: maps/ios/RNMBX/RNMBXNativeUserLocationComponentView.mm Lines 60 to 67 in b74fc6f
Those macros are defined here: What do you think? |
Looks good, I've seen this approach used too in some components in react-native core. I will update RNMBXShapeSourceComponentView to use those. |
@mfazekas Updated to use macros |
Description
On new arch when the map re-renders it causes the following error when using the
clusterMaxZoomLevel
prop. This is because this prop cannot be updated in mapbox-ios. This isn't a problem in the old architecture since the prop handler is only called when the prop changes, in the new arch it needs to be handled manually by comparing the props values.After this the error no longer appears, unless actually changing the value of
clusterMaxZoom
.It might be a good pattern to adopt generally for all components and props, but I thought it was out of scope of this since it would become a pretty big refactor.
Tested this change in an app that makes use of clustering.
Checklist
CONTRIBUTING.md
yarn generate
in the root folder/example
app./example
)Screenshot OR Video
Component to reproduce the issue you're fixing