diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt index ea8b3a0372ff..f72a99fed460 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<47baae9ffdb4a5fa461ce2800ba53b02>> + * @generated SignedSource<<7d80322a6a37083c5e52e6914de49ce2>> */ /** @@ -304,12 +304,6 @@ public object ReactNativeFeatureFlags { @JvmStatic public fun useRuntimeShadowNodeReferenceUpdate(): Boolean = accessor.useRuntimeShadowNodeReferenceUpdate() - /** - * When enabled, cloning shadow nodes during layout will update the reference held by the current JS fiber tree. - */ - @JvmStatic - public fun useRuntimeShadowNodeReferenceUpdateOnLayout(): Boolean = accessor.useRuntimeShadowNodeReferenceUpdateOnLayout() - /** * In Bridgeless mode, should legacy NativeModules use the TurboModule system? */ diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt index 6c2fc6f9216b..e83490e439a4 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<03a0cabe6d50fe943f98299777790e72>> + * @generated SignedSource<<761d3e7b100a4f5ee6f8bda71f84918b>> */ /** @@ -66,7 +66,6 @@ public class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAccesso private var useOptimisedViewPreallocationOnAndroidCache: Boolean? = null private var useOptimizedEventBatchingOnAndroidCache: Boolean? = null private var useRuntimeShadowNodeReferenceUpdateCache: Boolean? = null - private var useRuntimeShadowNodeReferenceUpdateOnLayoutCache: Boolean? = null private var useTurboModuleInteropCache: Boolean? = null private var useTurboModulesCache: Boolean? = null @@ -484,15 +483,6 @@ public class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAccesso return cached } - override fun useRuntimeShadowNodeReferenceUpdateOnLayout(): Boolean { - var cached = useRuntimeShadowNodeReferenceUpdateOnLayoutCache - if (cached == null) { - cached = ReactNativeFeatureFlagsCxxInterop.useRuntimeShadowNodeReferenceUpdateOnLayout() - useRuntimeShadowNodeReferenceUpdateOnLayoutCache = cached - } - return cached - } - override fun useTurboModuleInterop(): Boolean { var cached = useTurboModuleInteropCache if (cached == null) { diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt index dc82a385dedb..f7ea983d0419 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> + * @generated SignedSource<<1ed46e0bf712406c1bf6159e1bca3c15>> */ /** @@ -120,8 +120,6 @@ public object ReactNativeFeatureFlagsCxxInterop { @DoNotStrip @JvmStatic public external fun useRuntimeShadowNodeReferenceUpdate(): Boolean - @DoNotStrip @JvmStatic public external fun useRuntimeShadowNodeReferenceUpdateOnLayout(): Boolean - @DoNotStrip @JvmStatic public external fun useTurboModuleInterop(): Boolean @DoNotStrip @JvmStatic public external fun useTurboModules(): Boolean diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt index c899fdbe81ef..8ca9a5a5fa40 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> + * @generated SignedSource<<19cf402242ebd8b3a08dfb7c755b801b>> */ /** @@ -113,9 +113,7 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi override fun useOptimizedEventBatchingOnAndroid(): Boolean = false - override fun useRuntimeShadowNodeReferenceUpdate(): Boolean = false - - override fun useRuntimeShadowNodeReferenceUpdateOnLayout(): Boolean = false + override fun useRuntimeShadowNodeReferenceUpdate(): Boolean = true override fun useTurboModuleInterop(): Boolean = false diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt index 6d20dd38b621..9f2e607ee424 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<05002ec93dd47f1a1ca2716af08d9eed>> + * @generated SignedSource<> */ /** @@ -70,7 +70,6 @@ public class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcces private var useOptimisedViewPreallocationOnAndroidCache: Boolean? = null private var useOptimizedEventBatchingOnAndroidCache: Boolean? = null private var useRuntimeShadowNodeReferenceUpdateCache: Boolean? = null - private var useRuntimeShadowNodeReferenceUpdateOnLayoutCache: Boolean? = null private var useTurboModuleInteropCache: Boolean? = null private var useTurboModulesCache: Boolean? = null @@ -534,16 +533,6 @@ public class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcces return cached } - override fun useRuntimeShadowNodeReferenceUpdateOnLayout(): Boolean { - var cached = useRuntimeShadowNodeReferenceUpdateOnLayoutCache - if (cached == null) { - cached = currentProvider.useRuntimeShadowNodeReferenceUpdateOnLayout() - accessedFeatureFlags.add("useRuntimeShadowNodeReferenceUpdateOnLayout") - useRuntimeShadowNodeReferenceUpdateOnLayoutCache = cached - } - return cached - } - override fun useTurboModuleInterop(): Boolean { var cached = useTurboModuleInteropCache if (cached == null) { diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt index 1402a760d179..2b61fe1e583e 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> + * @generated SignedSource<> */ /** @@ -115,8 +115,6 @@ public interface ReactNativeFeatureFlagsProvider { @DoNotStrip public fun useRuntimeShadowNodeReferenceUpdate(): Boolean - @DoNotStrip public fun useRuntimeShadowNodeReferenceUpdateOnLayout(): Boolean - @DoNotStrip public fun useTurboModuleInterop(): Boolean @DoNotStrip public fun useTurboModules(): Boolean diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp b/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp index d46c6c74077f..43f06ab40118 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp +++ b/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<26d63ed84fb805148374dd23a637fdcf>> + * @generated SignedSource<<0ec332b341bc55ba1a0ab75f2ede82f6>> */ /** @@ -315,12 +315,6 @@ class ReactNativeFeatureFlagsProviderHolder return method(javaProvider_); } - bool useRuntimeShadowNodeReferenceUpdateOnLayout() override { - static const auto method = - getReactNativeFeatureFlagsProviderJavaClass()->getMethod("useRuntimeShadowNodeReferenceUpdateOnLayout"); - return method(javaProvider_); - } - bool useTurboModuleInterop() override { static const auto method = getReactNativeFeatureFlagsProviderJavaClass()->getMethod("useTurboModuleInterop"); @@ -567,11 +561,6 @@ bool JReactNativeFeatureFlagsCxxInterop::useRuntimeShadowNodeReferenceUpdate( return ReactNativeFeatureFlags::useRuntimeShadowNodeReferenceUpdate(); } -bool JReactNativeFeatureFlagsCxxInterop::useRuntimeShadowNodeReferenceUpdateOnLayout( - facebook::jni::alias_ref /*unused*/) { - return ReactNativeFeatureFlags::useRuntimeShadowNodeReferenceUpdateOnLayout(); -} - bool JReactNativeFeatureFlagsCxxInterop::useTurboModuleInterop( facebook::jni::alias_ref /*unused*/) { return ReactNativeFeatureFlags::useTurboModuleInterop(); @@ -737,9 +726,6 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() { makeNativeMethod( "useRuntimeShadowNodeReferenceUpdate", JReactNativeFeatureFlagsCxxInterop::useRuntimeShadowNodeReferenceUpdate), - makeNativeMethod( - "useRuntimeShadowNodeReferenceUpdateOnLayout", - JReactNativeFeatureFlagsCxxInterop::useRuntimeShadowNodeReferenceUpdateOnLayout), makeNativeMethod( "useTurboModuleInterop", JReactNativeFeatureFlagsCxxInterop::useTurboModuleInterop), diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h b/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h index 6d1071d1d00a..88609719fd65 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h +++ b/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<8cfb46b02812980196f70cfce43e4124>> + * @generated SignedSource<> */ /** @@ -168,9 +168,6 @@ class JReactNativeFeatureFlagsCxxInterop static bool useRuntimeShadowNodeReferenceUpdate( facebook::jni::alias_ref); - static bool useRuntimeShadowNodeReferenceUpdateOnLayout( - facebook::jni::alias_ref); - static bool useTurboModuleInterop( facebook::jni::alias_ref); diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp index 0dcbcfb7eeb2..9d2ce323288d 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> + * @generated SignedSource<<2cf7555474bd4808f9f451485da01d1a>> */ /** @@ -205,10 +205,6 @@ bool ReactNativeFeatureFlags::useRuntimeShadowNodeReferenceUpdate() { return getAccessor().useRuntimeShadowNodeReferenceUpdate(); } -bool ReactNativeFeatureFlags::useRuntimeShadowNodeReferenceUpdateOnLayout() { - return getAccessor().useRuntimeShadowNodeReferenceUpdateOnLayout(); -} - bool ReactNativeFeatureFlags::useTurboModuleInterop() { return getAccessor().useTurboModuleInterop(); } diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h index b7f8d65a1870..f54651cd58a9 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> + * @generated SignedSource<> */ /** @@ -267,11 +267,6 @@ class ReactNativeFeatureFlags { */ RN_EXPORT static bool useRuntimeShadowNodeReferenceUpdate(); - /** - * When enabled, cloning shadow nodes during layout will update the reference held by the current JS fiber tree. - */ - RN_EXPORT static bool useRuntimeShadowNodeReferenceUpdateOnLayout(); - /** * In Bridgeless mode, should legacy NativeModules use the TurboModule system? */ diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp index 7b34948c81f1..dec2f0433ed8 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> + * @generated SignedSource<<543c299c20c21d2d2e353c30645f94c7>> */ /** @@ -857,24 +857,6 @@ bool ReactNativeFeatureFlagsAccessor::useRuntimeShadowNodeReferenceUpdate() { return flagValue.value(); } -bool ReactNativeFeatureFlagsAccessor::useRuntimeShadowNodeReferenceUpdateOnLayout() { - auto flagValue = useRuntimeShadowNodeReferenceUpdateOnLayout_.load(); - - if (!flagValue.has_value()) { - // This block is not exclusive but it is not necessary. - // If multiple threads try to initialize the feature flag, we would only - // be accessing the provider multiple times but the end state of this - // instance and the returned flag value would be the same. - - markFlagAsAccessed(46, "useRuntimeShadowNodeReferenceUpdateOnLayout"); - - flagValue = currentProvider_->useRuntimeShadowNodeReferenceUpdateOnLayout(); - useRuntimeShadowNodeReferenceUpdateOnLayout_ = flagValue; - } - - return flagValue.value(); -} - bool ReactNativeFeatureFlagsAccessor::useTurboModuleInterop() { auto flagValue = useTurboModuleInterop_.load(); @@ -884,7 +866,7 @@ bool ReactNativeFeatureFlagsAccessor::useTurboModuleInterop() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(47, "useTurboModuleInterop"); + markFlagAsAccessed(46, "useTurboModuleInterop"); flagValue = currentProvider_->useTurboModuleInterop(); useTurboModuleInterop_ = flagValue; @@ -902,7 +884,7 @@ bool ReactNativeFeatureFlagsAccessor::useTurboModules() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(48, "useTurboModules"); + markFlagAsAccessed(47, "useTurboModules"); flagValue = currentProvider_->useTurboModules(); useTurboModules_ = flagValue; diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h index cebcc000a934..6a5c29e2031e 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<71e220a992b035e3e7ec39b54eb4cd6c>> + * @generated SignedSource<> */ /** @@ -77,7 +77,6 @@ class ReactNativeFeatureFlagsAccessor { bool useOptimisedViewPreallocationOnAndroid(); bool useOptimizedEventBatchingOnAndroid(); bool useRuntimeShadowNodeReferenceUpdate(); - bool useRuntimeShadowNodeReferenceUpdateOnLayout(); bool useTurboModuleInterop(); bool useTurboModules(); @@ -90,7 +89,7 @@ class ReactNativeFeatureFlagsAccessor { std::unique_ptr currentProvider_; bool wasOverridden_; - std::array, 49> accessedFeatureFlags_; + std::array, 48> accessedFeatureFlags_; std::atomic> commonTestFlag_; std::atomic> allowRecursiveCommitsWithSynchronousMountOnAndroid_; @@ -138,7 +137,6 @@ class ReactNativeFeatureFlagsAccessor { std::atomic> useOptimisedViewPreallocationOnAndroid_; std::atomic> useOptimizedEventBatchingOnAndroid_; std::atomic> useRuntimeShadowNodeReferenceUpdate_; - std::atomic> useRuntimeShadowNodeReferenceUpdateOnLayout_; std::atomic> useTurboModuleInterop_; std::atomic> useTurboModules_; }; diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h index 33c58ce6ed2b..1bef0e9b2da1 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> + * @generated SignedSource<<797150005bc7d5e76d4d004b54f8942b>> */ /** @@ -208,11 +208,7 @@ class ReactNativeFeatureFlagsDefaults : public ReactNativeFeatureFlagsProvider { } bool useRuntimeShadowNodeReferenceUpdate() override { - return false; - } - - bool useRuntimeShadowNodeReferenceUpdateOnLayout() override { - return false; + return true; } bool useTurboModuleInterop() override { diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h index 0d916e398325..c60fa8494cd8 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> + * @generated SignedSource<<49caf46d37d3321cd7c8a51385d15fc8>> */ /** @@ -71,7 +71,6 @@ class ReactNativeFeatureFlagsProvider { virtual bool useOptimisedViewPreallocationOnAndroid() = 0; virtual bool useOptimizedEventBatchingOnAndroid() = 0; virtual bool useRuntimeShadowNodeReferenceUpdate() = 0; - virtual bool useRuntimeShadowNodeReferenceUpdateOnLayout() = 0; virtual bool useTurboModuleInterop() = 0; virtual bool useTurboModules() = 0; }; diff --git a/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp b/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp index 1243939cbdbf..434eecf1883d 100644 --- a/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp +++ b/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<785a20a1ed79dc6a5f74dccfda1c8429>> + * @generated SignedSource<<630740f6b6c7a145658494862c697ce6>> */ /** @@ -267,11 +267,6 @@ bool NativeReactNativeFeatureFlags::useRuntimeShadowNodeReferenceUpdate( return ReactNativeFeatureFlags::useRuntimeShadowNodeReferenceUpdate(); } -bool NativeReactNativeFeatureFlags::useRuntimeShadowNodeReferenceUpdateOnLayout( - jsi::Runtime& /*runtime*/) { - return ReactNativeFeatureFlags::useRuntimeShadowNodeReferenceUpdateOnLayout(); -} - bool NativeReactNativeFeatureFlags::useTurboModuleInterop( jsi::Runtime& /*runtime*/) { return ReactNativeFeatureFlags::useTurboModuleInterop(); diff --git a/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h b/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h index 3bc005c0901d..d4d27ef64e6c 100644 --- a/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h +++ b/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<<0713247957f6ec9c4c024ab040fb89b5>> + * @generated SignedSource<<710fbb44aa7ffbc03d54b29b63aa0a73>> */ /** @@ -127,8 +127,6 @@ class NativeReactNativeFeatureFlags bool useRuntimeShadowNodeReferenceUpdate(jsi::Runtime& runtime); - bool useRuntimeShadowNodeReferenceUpdateOnLayout(jsi::Runtime& runtime); - bool useTurboModuleInterop(jsi::Runtime& runtime); bool useTurboModules(jsi::Runtime& runtime); diff --git a/packages/react-native/ReactCommon/react/renderer/components/view/YogaLayoutableShadowNode.cpp b/packages/react-native/ReactCommon/react/renderer/components/view/YogaLayoutableShadowNode.cpp index f2ea6fbbbf4c..ecd79739d0fa 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/view/YogaLayoutableShadowNode.cpp +++ b/packages/react-native/ReactCommon/react/renderer/components/view/YogaLayoutableShadowNode.cpp @@ -217,11 +217,6 @@ void YogaLayoutableShadowNode::adoptYogaChild(size_t index) { // TODO: At this point, React has wrong reference to the node. (T138668036) auto clonedChildNode = childNode.clone({}); - if (ReactNativeFeatureFlags:: - useRuntimeShadowNodeReferenceUpdateOnLayout()) { - childNode.transferRuntimeShadowNodeReference(clonedChildNode); - } - // Replace the child node with a newly cloned one in the children list. replaceChild(childNode, clonedChildNode, index); } @@ -529,10 +524,6 @@ YogaLayoutableShadowNode& YogaLayoutableShadowNode::cloneChildInPlace( ShadowNodeFragment::childrenPlaceholder(), childNode.getState()}); - if (ReactNativeFeatureFlags::useRuntimeShadowNodeReferenceUpdateOnLayout()) { - childNode.transferRuntimeShadowNodeReference(clonedChildNode); - } - replaceChild(childNode, clonedChildNode, layoutableChildIndex); return static_cast(*clonedChildNode); } diff --git a/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js b/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js index 8acaebeaa1ff..2e6e21e40e0d 100644 --- a/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js +++ b/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js @@ -423,21 +423,11 @@ const definitions: FeatureFlagDefinitions = { }, }, useRuntimeShadowNodeReferenceUpdate: { - defaultValue: false, + defaultValue: true, metadata: { - dateAdded: '2024-06-03', description: 'When enabled, cloning shadow nodes within react native will update the reference held by the current JS fiber tree.', - purpose: 'experimentation', - }, - }, - useRuntimeShadowNodeReferenceUpdateOnLayout: { - defaultValue: false, - metadata: { - dateAdded: '2024-06-03', - description: - 'When enabled, cloning shadow nodes during layout will update the reference held by the current JS fiber tree.', - purpose: 'experimentation', + purpose: 'release', }, }, useTurboModuleInterop: { diff --git a/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js b/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js index 37a0375094ff..7098b779c670 100644 --- a/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js +++ b/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> + * @generated SignedSource<<6141605aee700061696d61dc3121862c>> * @flow strict */ @@ -96,7 +96,6 @@ export type ReactNativeFeatureFlags = { useOptimisedViewPreallocationOnAndroid: Getter, useOptimizedEventBatchingOnAndroid: Getter, useRuntimeShadowNodeReferenceUpdate: Getter, - useRuntimeShadowNodeReferenceUpdateOnLayout: Getter, useTurboModuleInterop: Getter, useTurboModules: Getter, } @@ -369,11 +368,7 @@ export const useOptimizedEventBatchingOnAndroid: Getter = createNativeF /** * When enabled, cloning shadow nodes within react native will update the reference held by the current JS fiber tree. */ -export const useRuntimeShadowNodeReferenceUpdate: Getter = createNativeFlagGetter('useRuntimeShadowNodeReferenceUpdate', false); -/** - * When enabled, cloning shadow nodes during layout will update the reference held by the current JS fiber tree. - */ -export const useRuntimeShadowNodeReferenceUpdateOnLayout: Getter = createNativeFlagGetter('useRuntimeShadowNodeReferenceUpdateOnLayout', false); +export const useRuntimeShadowNodeReferenceUpdate: Getter = createNativeFlagGetter('useRuntimeShadowNodeReferenceUpdate', true); /** * In Bridgeless mode, should legacy NativeModules use the TurboModule system? */ diff --git a/packages/react-native/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js b/packages/react-native/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js index 39abcbe59c32..6863959f1dda 100644 --- a/packages/react-native/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +++ b/packages/react-native/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> + * @generated SignedSource<> * @flow strict */ @@ -69,7 +69,6 @@ export interface Spec extends TurboModule { +useOptimisedViewPreallocationOnAndroid?: () => boolean; +useOptimizedEventBatchingOnAndroid?: () => boolean; +useRuntimeShadowNodeReferenceUpdate?: () => boolean; - +useRuntimeShadowNodeReferenceUpdateOnLayout?: () => boolean; +useTurboModuleInterop?: () => boolean; +useTurboModules?: () => boolean; }