Replies: 1 comment
-
|
i got same behavior. it's bug ? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to embed a React Native view inside a UIKit view hierarchy, where the React Native view should automatically adapt its size based on its content.
I'm using the
RCTRootViewFactoryto create the view viaview(withModuleName:). This returns an instance ofRCTSurfaceHostingProxyRootView, which is meant to behave like a drop-in replacement forRCTRootView.According to the current React Native docs, you can set the
sizeFlexibilityanddelegateproperties to get notified when the view’s intrinsic size changes. However, in my case—under the New Architecture and Fabric—the delegate method never gets called.Finding:
RCTFabricSurfacevs.RCTSurfaceDigging into the implementation, I noticed that
RCTSurfaceHostingProxyRootView(under Fabric) internally usesRCTFabricSurface. UnlikeRCTSurface,RCTFabricSurfacedoes not call the delegate methods that notify about intrinsic size changes.This is confusing, because the official guidance seems to assume that behavior is still supported. So my questions are:
Any insight would be greatly appreciated!
Beta Was this translation helpful? Give feedback.
All reactions