Wire up mobile config for cloneless state progression feature flag (#39428)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39428

changelog: [internal]

bypass-github-export-checks

Reviewed By: rozele, rshest

Differential Revision: D49234105

fbshipit-source-id: e0c9376e57de010b95dd023d60609b6b052843aa
This commit is contained in:
Samuel Susla
2023-09-14 09:42:04 -07:00
committed by Facebook GitHub Bot
parent 59e6b11fbc
commit b5d69af3f0
3 changed files with 9 additions and 0 deletions
@@ -288,6 +288,10 @@ static BackgroundExecutor RCTGetBackgroundExecutor()
CoreFeatures::enableDefaultAsyncBatchedPriority = true;
}
if (reactNativeConfig && reactNativeConfig->getBool("react_fabric:enable_cloneless_state_progression")) {
CoreFeatures::enableClonelessStateProgression = true;
}
auto componentRegistryFactory =
[factory = wrapManagedObject(_mountingManager.componentViewRegistry.componentViewFactory)](
const EventDispatcher::Weak &eventDispatcher, const ContextContainer::Shared &contextContainer) {
@@ -156,4 +156,7 @@ public class ReactFeatureFlags {
/** Utilize shared Event C++ pipeline with fabric's renderer */
public static boolean enableFabricSharedEventPipeline = false;
/** When enabled, Fabric will avoid cloning notes to perform state progression. */
public static boolean enableClonelessStateProgression = false;
}
@@ -436,6 +436,8 @@ void Binding::installFabricUIManager(
getFeatureFlagValue("enableCleanParagraphYogaNode");
CoreFeatures::enableDefaultAsyncBatchedPriority =
getFeatureFlagValue("enableDefaultAsyncBatchedPriority");
CoreFeatures::enableClonelessStateProgression =
getFeatureFlagValue("enableClonelessStateProgression");
// RemoveDelete mega-op
ShadowViewMutation::PlatformSupportsRemoveDeleteTreeInstruction =