Fabric: Gating for on-demand view mounting in ScrollView

Summary:
Just gating.

Changelog: [Internal] Fabric-specific internal change.

Reviewed By: sammy-SC

Differential Revision: D22325692

fbshipit-source-id: 14cdfb4bf10ad00e090a91659138639360020fca
This commit is contained in:
Valentin Shergin
2020-07-01 18:25:14 -07:00
committed by Facebook GitHub Bot
parent 9a72702b44
commit e223f2c2bf
+6
View File
@@ -23,6 +23,8 @@
#import <React/RCTSurfaceView.h>
#import <React/RCTUtils.h>
#import <React/RCTScrollViewComponentView.h>
#import <react/componentregistry/ComponentDescriptorFactory.h>
#import <react/components/root/RootShadowNode.h>
#import <react/config/ReactNativeConfig.h>
@@ -288,6 +290,10 @@ static inline LayoutContext RCTGetLayoutContext()
{
auto reactNativeConfig = _contextContainer->at<std::shared_ptr<ReactNativeConfig const>>("ReactNativeConfig");
if (reactNativeConfig && reactNativeConfig->getBool("react_fabric:scrollview_on_demand_mounting_ios")) {
RCTSetEnableOnDemandViewMounting(YES);
}
auto componentRegistryFactory =
[factory = wrapManagedObject(_mountingManager.componentViewRegistry.componentViewFactory)](
EventDispatcher::Weak const &eventDispatcher, ContextContainer::Shared const &contextContainer) {