diff --git a/React/Fabric/Mounting/ComponentViews/ActivityIndicator/RCTActivityIndicatorViewComponentView.mm b/React/Fabric/Mounting/ComponentViews/ActivityIndicator/RCTActivityIndicatorViewComponentView.mm index 9f103e93ced..c1ac244f05f 100644 --- a/React/Fabric/Mounting/ComponentViews/ActivityIndicator/RCTActivityIndicatorViewComponentView.mm +++ b/React/Fabric/Mounting/ComponentViews/ActivityIndicator/RCTActivityIndicatorViewComponentView.mm @@ -58,7 +58,7 @@ static UIActivityIndicatorViewStyle convertActivityIndicatorViewStyle(const Acti return self; } -- (void)updateProps:(SharedProps)props oldProps:(SharedProps)oldProps +- (void)updateProps:(Props::Shared const &)props oldProps:(Props::Shared const &)oldProps { const auto &oldViewProps = *std::static_pointer_cast(oldProps ?: _props); const auto &newViewProps = *std::static_pointer_cast(props); diff --git a/React/Fabric/Mounting/ComponentViews/Image/RCTImageComponentView.mm b/React/Fabric/Mounting/ComponentViews/Image/RCTImageComponentView.mm index ad8231d4fa0..c85e0a8837f 100644 --- a/React/Fabric/Mounting/ComponentViews/Image/RCTImageComponentView.mm +++ b/React/Fabric/Mounting/ComponentViews/Image/RCTImageComponentView.mm @@ -50,7 +50,7 @@ return concreteComponentDescriptorProvider(); } -- (void)updateProps:(SharedProps)props oldProps:(SharedProps)oldProps +- (void)updateProps:(Props::Shared const &)props oldProps:(Props::Shared const &)oldProps { const auto &oldImageProps = *std::static_pointer_cast(oldProps ?: _props); const auto &newImageProps = *std::static_pointer_cast(props); diff --git a/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm b/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm index aaeda9b7544..bcdeadac928 100644 --- a/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm +++ b/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm @@ -69,7 +69,7 @@ using namespace facebook::react; return concreteComponentDescriptorProvider(); } -- (void)updateProps:(SharedProps)props oldProps:(SharedProps)oldProps +- (void)updateProps:(Props::Shared const &)props oldProps:(Props::Shared const &)oldProps { const auto &oldScrollViewProps = *std::static_pointer_cast(oldProps ?: _props); const auto &newScrollViewProps = *std::static_pointer_cast(props); diff --git a/React/Fabric/Mounting/ComponentViews/ScrollView/RNPullToRefreshViewComponentView.mm b/React/Fabric/Mounting/ComponentViews/ScrollView/RNPullToRefreshViewComponentView.mm index c43b2f150f4..44705d83fb2 100644 --- a/React/Fabric/Mounting/ComponentViews/ScrollView/RNPullToRefreshViewComponentView.mm +++ b/React/Fabric/Mounting/ComponentViews/ScrollView/RNPullToRefreshViewComponentView.mm @@ -11,8 +11,8 @@ #import #import -#import #import +#import using namespace facebook::react; @@ -33,7 +33,9 @@ using namespace facebook::react; _props = defaultProps; _refreshControl = [[UIRefreshControl alloc] init]; - [_refreshControl addTarget:self action:@selector(handleUIControlEventValueChanged) forControlEvents:UIControlEventValueChanged]; + [_refreshControl addTarget:self + action:@selector(handleUIControlEventValueChanged) + forControlEvents:UIControlEventValueChanged]; } return self; @@ -46,7 +48,7 @@ using namespace facebook::react; return concreteComponentDescriptorProvider(); } -- (void)updateProps:(SharedProps)props oldProps:(SharedProps)oldProps +- (void)updateProps:(Props::Shared const &)props oldProps:(Props::Shared const &)oldProps { auto const &oldConcreteProps = *std::static_pointer_cast(oldProps ?: _props); auto const &newConcreteProps = *std::static_pointer_cast(props); @@ -97,7 +99,8 @@ using namespace facebook::react; attributes[NSForegroundColorAttributeName] = RCTUIColorFromSharedColor(concreteProps.titleColor); } - _refreshControl.attributedTitle = [[NSAttributedString alloc] initWithString:RCTNSStringFromString(concreteProps.title) attributes:attributes]; + _refreshControl.attributedTitle = + [[NSAttributedString alloc] initWithString:RCTNSStringFromString(concreteProps.title) attributes:attributes]; } #pragma mark - Attaching & Detaching diff --git a/React/Fabric/Mounting/ComponentViews/Slider/RCTSliderComponentView.mm b/React/Fabric/Mounting/ComponentViews/Slider/RCTSliderComponentView.mm index f71ab528394..30dcb945638 100644 --- a/React/Fabric/Mounting/ComponentViews/Slider/RCTSliderComponentView.mm +++ b/React/Fabric/Mounting/ComponentViews/Slider/RCTSliderComponentView.mm @@ -107,7 +107,7 @@ using namespace facebook::react; return concreteComponentDescriptorProvider(); } -- (void)updateProps:(SharedProps)props oldProps:(SharedProps)oldProps +- (void)updateProps:(Props::Shared const &)props oldProps:(Props::Shared const &)oldProps { const auto &oldSliderProps = *std::static_pointer_cast(oldProps ?: _props); const auto &newSliderProps = *std::static_pointer_cast(props); diff --git a/React/Fabric/Mounting/ComponentViews/Switch/RCTSwitchComponentView.mm b/React/Fabric/Mounting/ComponentViews/Switch/RCTSwitchComponentView.mm index 2857748dab8..24a84a5dfda 100644 --- a/React/Fabric/Mounting/ComponentViews/Switch/RCTSwitchComponentView.mm +++ b/React/Fabric/Mounting/ComponentViews/Switch/RCTSwitchComponentView.mm @@ -43,7 +43,7 @@ using namespace facebook::react; return concreteComponentDescriptorProvider(); } -- (void)updateProps:(SharedProps)props oldProps:(SharedProps)oldProps +- (void)updateProps:(Props::Shared const &)props oldProps:(Props::Shared const &)oldProps { const auto &oldSwitchProps = *std::static_pointer_cast(oldProps ?: _props); const auto &newSwitchProps = *std::static_pointer_cast(props); diff --git a/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentView.mm b/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentView.mm index 9a64f5c30dc..1da31b99f15 100644 --- a/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentView.mm +++ b/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentView.mm @@ -53,7 +53,7 @@ using namespace facebook::react; concreteComponentDescriptorProvider()}; } -- (void)updateProps:(SharedProps)props oldProps:(SharedProps)oldProps +- (void)updateProps:(Props::Shared const &)props oldProps:(Props::Shared const &)oldProps { const auto ¶graphProps = std::static_pointer_cast(props); diff --git a/React/Fabric/Mounting/ComponentViews/UnimplementedComponent/RCTUnimplementedNativeComponentView.mm b/React/Fabric/Mounting/ComponentViews/UnimplementedComponent/RCTUnimplementedNativeComponentView.mm index bf5fdd1e709..f231a2d2eae 100644 --- a/React/Fabric/Mounting/ComponentViews/UnimplementedComponent/RCTUnimplementedNativeComponentView.mm +++ b/React/Fabric/Mounting/ComponentViews/UnimplementedComponent/RCTUnimplementedNativeComponentView.mm @@ -45,7 +45,7 @@ using namespace facebook::react; return concreteComponentDescriptorProvider(); } -- (void)updateProps:(SharedProps)props oldProps:(SharedProps)oldProps +- (void)updateProps:(Props::Shared const &)props oldProps:(Props::Shared const &)oldProps { const auto &oldViewProps = *std::static_pointer_cast(oldProps ?: _props); const auto &newViewProps = *std::static_pointer_cast(props); diff --git a/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.h b/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.h index 9cd1cbf3a63..d8593c0c362 100644 --- a/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.h +++ b/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.h @@ -71,8 +71,8 @@ NS_ASSUME_NONNULL_BEGIN /** * Enforcing `call super` semantic for overridden methods from `RCTComponentViewProtocol`. */ -- (void)updateProps:(facebook::react::SharedProps)props - oldProps:(facebook::react::SharedProps)oldProps NS_REQUIRES_SUPER; +- (void)updateProps:(facebook::react::Props::Shared const &)props + oldProps:(facebook::react::Props::Shared const &)oldProps NS_REQUIRES_SUPER; - (void)updateEventEmitter:(facebook::react::SharedEventEmitter)eventEmitter NS_REQUIRES_SUPER; - (void)updateLayoutMetrics:(facebook::react::LayoutMetrics)layoutMetrics oldLayoutMetrics:(facebook::react::LayoutMetrics)oldLayoutMetrics NS_REQUIRES_SUPER; diff --git a/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm b/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm index 39425793a0f..c723fdd63a7 100644 --- a/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm +++ b/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm @@ -94,7 +94,7 @@ using namespace facebook::react; return concreteComponentDescriptorProvider(); } -- (void)updateProps:(SharedProps)props oldProps:(SharedProps)oldProps +- (void)updateProps:(Props::Shared const &)props oldProps:(Props::Shared const &)oldProps { #ifndef NS_BLOCK_ASSERTIONS auto propsRawPtr = _props.get(); @@ -332,12 +332,10 @@ static RCTCornerRadii RCTCornerRadiiFromBorderRadii(BorderRadii borderRadii) static RCTBorderColors RCTBorderColorsFromBorderColors(BorderColors borderColors) { - return RCTBorderColors{ - .left = RCTCGColorRefUnretainedFromSharedColor(borderColors.left), - .top = RCTCGColorRefUnretainedFromSharedColor(borderColors.top), - .bottom = RCTCGColorRefUnretainedFromSharedColor(borderColors.bottom), - .right = RCTCGColorRefUnretainedFromSharedColor(borderColors.right) - }; + return RCTBorderColors{.left = RCTCGColorRefUnretainedFromSharedColor(borderColors.left), + .top = RCTCGColorRefUnretainedFromSharedColor(borderColors.top), + .bottom = RCTCGColorRefUnretainedFromSharedColor(borderColors.bottom), + .right = RCTCGColorRefUnretainedFromSharedColor(borderColors.right)}; } static UIEdgeInsets UIEdgeInsetsFromBorderInsets(EdgeInsets edgeInsets) diff --git a/React/Fabric/Mounting/RCTComponentViewProtocol.h b/React/Fabric/Mounting/RCTComponentViewProtocol.h index e5e1c6a5c06..0269217bdaf 100644 --- a/React/Fabric/Mounting/RCTComponentViewProtocol.h +++ b/React/Fabric/Mounting/RCTComponentViewProtocol.h @@ -70,7 +70,8 @@ typedef NS_OPTIONS(NSInteger, RNComponentViewUpdateMask) { * Called for updating component's props. * Receiver must update native view props accordingly changed props. */ -- (void)updateProps:(facebook::react::SharedProps)props oldProps:(facebook::react::SharedProps)oldProps; +- (void)updateProps:(facebook::react::Props::Shared const &)props + oldProps:(facebook::react::Props::Shared const &)oldProps; /* * Called for updating component's local data. diff --git a/React/Fabric/Mounting/UIView+ComponentViewProtocol.h b/React/Fabric/Mounting/UIView+ComponentViewProtocol.h index 35bb307da1e..831708f2f49 100644 --- a/React/Fabric/Mounting/UIView+ComponentViewProtocol.h +++ b/React/Fabric/Mounting/UIView+ComponentViewProtocol.h @@ -22,7 +22,8 @@ NS_ASSUME_NONNULL_BEGIN - (void)unmountChildComponentView:(UIView *)childComponentView index:(NSInteger)index; -- (void)updateProps:(facebook::react::SharedProps)props oldProps:(facebook::react::SharedProps)oldProps; +- (void)updateProps:(facebook::react::Props::Shared const &)props + oldProps:(facebook::react::Props::Shared const &)oldProps; - (void)updateEventEmitter:(facebook::react::SharedEventEmitter)eventEmitter; diff --git a/React/Fabric/Mounting/UIView+ComponentViewProtocol.mm b/React/Fabric/Mounting/UIView+ComponentViewProtocol.mm index 6d25817c091..db23fecf50b 100644 --- a/React/Fabric/Mounting/UIView+ComponentViewProtocol.mm +++ b/React/Fabric/Mounting/UIView+ComponentViewProtocol.mm @@ -39,7 +39,7 @@ using namespace facebook::react; [childComponentView removeFromSuperview]; } -- (void)updateProps:(SharedProps)props oldProps:(SharedProps)oldProps +- (void)updateProps:(Props::Shared const &)props oldProps:(Props::Shared const &)oldProps { // Default implementation does nothing. }