Skip to content

Commit 262ed25

Browse files
zeyapfacebook-github-bot
authored andcommitted
Add animatedDeferStartOfTimingAnimations feature flag (facebook#57004)
Summary: Add the `animatedDeferStartOfTimingAnimations` JS feature flag (default off). On its own this is a no-op; it gates deferring the start of native-driven timing animations to the first rendered frame, implemented in the following diffs. Includes the regenerated `ReactNativeFeatureFlags.js`. ## Changelog: [Internal] [Changed] - Add animatedDeferStartOfTimingAnimations feature flag Differential Revision: D106825629
1 parent d80204a commit 262ed25

2 files changed

Lines changed: 18 additions & 1 deletion

File tree

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -981,6 +981,17 @@ const definitions: FeatureFlagDefinitions = {
981981

982982
jsOnly: {
983983
...testDefinitions.jsOnly,
984+
animatedDeferStartOfTimingAnimations: {
985+
defaultValue: false,
986+
metadata: {
987+
dateAdded: '2026-05-26',
988+
description:
989+
'When enabled, native timing animations defer their first frame and re-anchor timing to prevent skipping initial frames when the UI thread is busy with layout work.',
990+
expectedReleaseValue: true,
991+
purpose: 'experimentation',
992+
},
993+
ossReleaseStage: 'none',
994+
},
984995
animatedShouldDebounceQueueFlush: {
985996
defaultValue: false,
986997
metadata: {

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

Lines changed: 7 additions & 1 deletion
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<<7f48f734cd7a098d04cb147980ef364a>>
7+
* @generated SignedSource<<a464b9ef1056058917da8b9a70c903a3>>
88
* @flow strict
99
* @noformat
1010
*/
@@ -29,6 +29,7 @@ import {
2929

3030
export type ReactNativeFeatureFlagsJsOnly = $ReadOnly<{
3131
jsOnlyTestFlag: Getter<boolean>,
32+
animatedDeferStartOfTimingAnimations: Getter<boolean>,
3233
animatedShouldDebounceQueueFlush: Getter<boolean>,
3334
animatedShouldUseSingleOp: Getter<boolean>,
3435
deferFlatListFocusChangeRenderUpdate: Getter<boolean>,
@@ -140,6 +141,11 @@ export type ReactNativeFeatureFlags = $ReadOnly<{
140141
*/
141142
export const jsOnlyTestFlag: Getter<boolean> = createJavaScriptFlagGetter('jsOnlyTestFlag', false);
142143

144+
/**
145+
* When enabled, native timing animations defer their first frame and re-anchor timing to prevent skipping initial frames when the UI thread is busy with layout work.
146+
*/
147+
export const animatedDeferStartOfTimingAnimations: Getter<boolean> = createJavaScriptFlagGetter('animatedDeferStartOfTimingAnimations', false);
148+
143149
/**
144150
* Enables an experimental flush-queue debouncing in Animated.js.
145151
*/

0 commit comments

Comments
 (0)