Skip to content

Commit

Permalink
[iOS] Fabric: Fixes LayoutConformanceView not work
Browse files Browse the repository at this point in the history
  • Loading branch information
zhongwuzw committed Dec 13, 2024
1 parent 06751aa commit e23c3de
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#import <react/renderer/componentregistry/ComponentDescriptorProviderRegistry.h>
#import <react/renderer/componentregistry/componentNameByReactViewName.h>
#import <react/renderer/componentregistry/native/NativeComponentRegistryBinding.h>
#import <react/renderer/components/view/LayoutConformanceComponentDescriptor.h>
#import <react/renderer/core/PropsParserContext.h>
#import <react/renderer/core/ReactPrimitives.h>

Expand Down Expand Up @@ -75,6 +76,8 @@ + (RCTComponentViewFactory *)currentComponentViewFactory
componentViewFactory = [RCTComponentViewFactory new];
[componentViewFactory registerComponentViewClass:[RCTRootComponentView class]];
[componentViewFactory registerComponentViewClass:[RCTParagraphComponentView class]];
componentViewFactory->_providerRegistry.add(
concreteComponentDescriptorProvider<LayoutConformanceComponentDescriptor>());

componentViewFactory->_providerRegistry.setComponentDescriptorProviderRequest(
[](ComponentName requestedComponentName) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,13 @@ namespace facebook::react {
constexpr const char LayoutConformanceShadowNodeComponentName[] =
"LayoutConformance";

using LayoutConformanceShadowNode = ConcreteShadowNode<
LayoutConformanceShadowNodeComponentName,
YogaLayoutableShadowNode,
LayoutConformanceProps>;
class LayoutConformanceShadowNode final
: public ConcreteShadowNode<
LayoutConformanceShadowNodeComponentName,
YogaLayoutableShadowNode,
LayoutConformanceProps> {
public:
using ConcreteShadowNode::ConcreteShadowNode;
};

} // namespace facebook::react

0 comments on commit e23c3de

Please sign in to comment.