mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
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:
committed by
Facebook GitHub Bot
parent
9a72702b44
commit
e223f2c2bf
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user