Skip to content

Commit 2a13d20

Browse files
yungstersfacebook-github-bot
authored andcommitted
RN: Enable avoidStateUpdateInAnimatedPropsMemo by Default (#51635)
Summary: Pull Request resolved: #51635 Enables a feature flag by default, that reduces the memory usage of`Animated`. For more details, see: #49184 Changelog: [General][Changed] - Enabled a feature flag that optimizes `Animated` to reduce memory usage. Reviewed By: jehartzog Differential Revision: D75466724 fbshipit-source-id: 3fdb57f394448bbd0530dcb558a58958010d0edd
1 parent 7ef278a commit 2a13d20

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
@@ -613,13 +613,12 @@ const definitions: FeatureFlagDefinitions = {
613613
ossReleaseStage: 'none',
614614
},
615615
avoidStateUpdateInAnimatedPropsMemo: {
616-
defaultValue: false,
616+
defaultValue: true,
617617
metadata: {
618-
dateAdded: '2025-02-05',
619618
description:
620619
'Changes `useAnimatedPropsMemo` to avoid state updates to invalidate the cached `AnimatedProps`.',
621620
expectedReleaseValue: true,
622-
purpose: 'experimentation',
621+
purpose: 'release',
623622
},
624623
ossReleaseStage: 'none',
625624
},

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<<4d96a5f9132ea827faeb183fe8bbf095>>
7+
* @generated SignedSource<<116217572bb442c615e346324966d670>>
88
* @flow strict
99
* @noformat
1010
*/
@@ -121,7 +121,7 @@ export const animatedShouldUseSingleOp: Getter<boolean> = createJavaScriptFlagGe
121121
/**
122122
* Changes `useAnimatedPropsMemo` to avoid state updates to invalidate the cached `AnimatedProps`.
123123
*/
124-
export const avoidStateUpdateInAnimatedPropsMemo: Getter<boolean> = createJavaScriptFlagGetter('avoidStateUpdateInAnimatedPropsMemo', false);
124+
export const avoidStateUpdateInAnimatedPropsMemo: Getter<boolean> = createJavaScriptFlagGetter('avoidStateUpdateInAnimatedPropsMemo', true);
125125

126126
/**
127127
* Disables InteractionManager and replaces its scheduler with `setImmediate`.

0 commit comments

Comments
 (0)