diff --git a/ios/RNMBX/RNMBXMarkerViewComponentView.mm b/ios/RNMBX/RNMBXMarkerViewComponentView.mm index 17ce30770c..31ad30ba2b 100644 --- a/ios/RNMBX/RNMBXMarkerViewComponentView.mm +++ b/ios/RNMBX/RNMBXMarkerViewComponentView.mm @@ -11,6 +11,8 @@ #import #import +#import "RNMBXFabricPropConvert.h" + using namespace facebook::react; @interface RNMBXMarkerViewComponentView () @@ -68,28 +70,21 @@ + (ComponentDescriptorProvider)componentDescriptorProvider - (void)updateProps:(const Props::Shared &)props oldProps:(const Props::Shared &)oldProps { - const auto &newProps = static_cast(*props); - - id coordinate = RNMBXConvertFollyDynamicToId(newProps.coordinate); + const auto &newViewProps = static_cast(*props); + const auto &oldViewProps = + static_cast(*oldProps); + + id coordinate = RNMBXConvertFollyDynamicToId(newViewProps.coordinate); if (coordinate != nil) { _view.coordinate = coordinate; } - id anchor = RNMBXConvertFollyDynamicToId(newProps.anchor); + id anchor = RNMBXConvertFollyDynamicToId(newViewProps.anchor); if (anchor != nil) { _view.anchor = anchor; } - id allowOverlap = RNMBXConvertFollyDynamicToId(newProps.allowOverlap); - if (allowOverlap != nil) { - _view.allowOverlap = allowOverlap; - } - id allowOverlapWithPuck = RNMBXConvertFollyDynamicToId(newProps.allowOverlapWithPuck); - if (allowOverlapWithPuck != nil) { - _view.allowOverlapWithPuck = allowOverlapWithPuck; - } - id isSelected = RNMBXConvertFollyDynamicToId(newProps.isSelected); - if (isSelected != nil) { - _view.isSelected = isSelected; - } + RNMBX_REMAP_OPTIONAL_PROP_BOOL(allowOverlap, allowOverlap); + RNMBX_REMAP_OPTIONAL_PROP_BOOL(allowOverlapWithPuck, allowOverlapWithPuck); + RNMBX_REMAP_OPTIONAL_PROP_BOOL(isSelected, isSelected); [super updateProps:props oldProps:oldProps]; }