Skip to content

Commit e0c0476

Browse files
yungstersfacebook-github-bot
authored andcommitted
RN: Re-enable useInsertionEffectsForAnimations (#48708)
Summary: Pull Request resolved: #48708 {D68171721} [#48678](#48678) mitigated the bug that necessitated this revert. Changelog: [General][Changed] - (Reapply) The `AnimatedNode` graph will not occur during the insertion effect phase, which means animations can now be reliably started during layout effects. Reviewed By: sammy-SC Differential Revision: D68217144 fbshipit-source-id: 6796440f2839d897158528642e07869951651327
1 parent e566c1e commit e0c0476

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -627,13 +627,12 @@ const definitions: FeatureFlagDefinitions = {
627627
},
628628
},
629629
useInsertionEffectsForAnimations: {
630-
defaultValue: false,
630+
defaultValue: true,
631631
metadata: {
632-
dateAdded: '2024-09-12',
633632
description:
634633
'Changes construction of the animation graph to `useInsertionEffect` instead of `useLayoutEffect`.',
635634
expectedReleaseValue: true,
636-
purpose: 'experimentation',
635+
purpose: 'release',
637636
},
638637
},
639638
useRefsForTextInputState: {

packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<a88e25ee1e5bb8a324ff861c0703b9aa>>
7+
* @generated SignedSource<<b7909873b5a9f72390db3a451f719b83>>
88
* @flow strict
99
*/
1010

@@ -177,7 +177,7 @@ export const shouldUseSetNativePropsInFabric: Getter<boolean> = createJavaScript
177177
/**
178178
* Changes construction of the animation graph to `useInsertionEffect` instead of `useLayoutEffect`.
179179
*/
180-
export const useInsertionEffectsForAnimations: Getter<boolean> = createJavaScriptFlagGetter('useInsertionEffectsForAnimations', false);
180+
export const useInsertionEffectsForAnimations: Getter<boolean> = createJavaScriptFlagGetter('useInsertionEffectsForAnimations', true);
181181

182182
/**
183183
* Enable a variant of TextInput that moves some state to refs to avoid unnecessary re-renders

0 commit comments

Comments
 (0)