From c799aa07e2148a2ca38939cb72468c949ed0c95f Mon Sep 17 00:00:00 2001 From: Samuel Susla Date: Tue, 14 Jan 2025 08:20:05 -0800 Subject: [PATCH] Back out "RN: Enable `useInsertionEffectsForAnimations`" (#48669) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/48669 Original commit changeset: d09b2f1b7607 Original Phabricator Diff: D65906157 ## Changelog: [General] [Fixed] - Buttons becoming unresponsive when transform is animated Reviewed By: yungsters Differential Revision: D68152746 fbshipit-source-id: aa0c0aa3243c67c95128a75b40dd6aa1251abbca --- .../scripts/featureflags/ReactNativeFeatureFlags.config.js | 5 +++-- .../src/private/featureflags/ReactNativeFeatureFlags.js | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js b/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js index 744e112311a..9be0b03e20a 100644 --- a/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js +++ b/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js @@ -618,12 +618,13 @@ const definitions: FeatureFlagDefinitions = { }, }, useInsertionEffectsForAnimations: { - defaultValue: true, + defaultValue: false, metadata: { + dateAdded: '2024-09-12', description: 'Changes construction of the animation graph to `useInsertionEffect` instead of `useLayoutEffect`.', expectedReleaseValue: true, - purpose: 'release', + purpose: 'experimentation', }, }, useRefsForTextInputState: { diff --git a/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js b/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js index cebed3c31ea..9e3e918b870 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<<3037cf1c938dae492b656333cec9633c>> + * @generated SignedSource<<3bdec862f75745ce81e9cf23fef82468>> * @flow strict */ @@ -176,7 +176,7 @@ export const shouldUseSetNativePropsInFabric: Getter = createJavaScript /** * Changes construction of the animation graph to `useInsertionEffect` instead of `useLayoutEffect`. */ -export const useInsertionEffectsForAnimations: Getter = createJavaScriptFlagGetter('useInsertionEffectsForAnimations', true); +export const useInsertionEffectsForAnimations: Getter = createJavaScriptFlagGetter('useInsertionEffectsForAnimations', false); /** * Enable a variant of TextInput that moves some state to refs to avoid unnecessary re-renders