diff --git a/change/react-native-windows-9081e071-efb6-42dd-819d-ea225f04f77e.json b/change/react-native-windows-9081e071-efb6-42dd-819d-ea225f04f77e.json new file mode 100644 index 00000000000..4e9cff57e31 --- /dev/null +++ b/change/react-native-windows-9081e071-efb6-42dd-819d-ea225f04f77e.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "[Fabric] Realign our AbiComponentDescriptors with core's", + "packageName": "react-native-windows", + "email": "30809111+acoates-ms@users.noreply.github.com", + "dependentChangeType": "patch" +} diff --git a/vnext/Microsoft.ReactNative/Fabric/AbiComponentDescriptor.cpp b/vnext/Microsoft.ReactNative/Fabric/AbiComponentDescriptor.cpp index 00d808d7905..1f899359a75 100644 --- a/vnext/Microsoft.ReactNative/Fabric/AbiComponentDescriptor.cpp +++ b/vnext/Microsoft.ReactNative/Fabric/AbiComponentDescriptor.cpp @@ -59,6 +59,7 @@ facebook::react::ShadowNode::Unshared AbiComponentDescriptor::cloneShadowNode( const facebook::react::ShadowNode &sourceShadowNode, const facebook::react::ShadowNodeFragment &fragment) const { auto shadowNode = std::make_shared(sourceShadowNode, fragment); + sourceShadowNode.transferRuntimeShadowNodeReference(shadowNode, fragment); shadowNode->Proxy(winrt::make(shadowNode)); winrt::get_self(m_builder) @@ -89,10 +90,8 @@ facebook::react::Props::Shared AbiComponentDescriptor::cloneProps( return ShadowNodeT::defaultSharedProps(); } - if constexpr (std::is_base_of_v) { - if (facebook::react::CoreFeatures::excludeYogaFromRawProps) { - rawProps.filterYogaStylePropsInDynamicConversion(); - } + if constexpr (facebook::react::RawPropsFilterable) { + ShadowNodeT::filterRawProps(rawProps); } rawProps.parse(rawPropsParser_); diff --git a/vnext/Microsoft.ReactNative/Fabric/AbiViewComponentDescriptor.cpp b/vnext/Microsoft.ReactNative/Fabric/AbiViewComponentDescriptor.cpp index 1c8ffc99762..573291baf89 100644 --- a/vnext/Microsoft.ReactNative/Fabric/AbiViewComponentDescriptor.cpp +++ b/vnext/Microsoft.ReactNative/Fabric/AbiViewComponentDescriptor.cpp @@ -46,6 +46,7 @@ std::shared_ptr AbiViewComponentDescriptor::createS const facebook::react::ShadowNodeFragment &fragment, facebook::react::ShadowNodeFamily::Shared const &family) const { auto shadowNode = std::make_shared(fragment, family, getTraits()); + sourceShadowNode.transferRuntimeShadowNodeReference(shadowNode, fragment); shadowNode->Proxy(winrt::make(shadowNode)); winrt::get_self(m_builder)