Skip to content

Commit af08e67

Browse files
zeyapmeta-codesync[bot]
authored andcommitted
Add animatedDeferStartOfTimingAnimations feature flag (#57004)
Summary: Pull Request resolved: #57004 Add the `animatedDeferStartOfTimingAnimations` JS only 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 diff. Changelog: [Internal] Reviewed By: rubennorte Differential Revision: D106825629 fbshipit-source-id: a7d5d209a89299b11b3976f44bbf89a7fae0ae49
1 parent 9dd979e commit af08e67

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
@@ -992,6 +992,17 @@ const definitions: FeatureFlagDefinitions = {
992992

993993
jsOnly: {
994994
...testDefinitions.jsOnly,
995+
animatedDeferStartOfTimingAnimations: {
996+
defaultValue: false,
997+
metadata: {
998+
dateAdded: '2026-05-26',
999+
description:
1000+
'When enabled, the JS Animated layer defers the start of native-driven timing animations to the first rendered frame and re-anchors timing to prevent skipping initial frames when the UI thread is busy with layout work.',
1001+
expectedReleaseValue: true,
1002+
purpose: 'experimentation',
1003+
},
1004+
ossReleaseStage: 'none',
1005+
},
9951006
animatedShouldDebounceQueueFlush: {
9961007
defaultValue: false,
9971008
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<<9ea39238fb9e7a4fd17f5c6a4f557e8c>>
7+
* @generated SignedSource<<d9146c8c9b0c602e4cedb99e6d91558e>>
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
animatedShouldSyncValueBeforeStartCallback: Getter<boolean>,
3435
animatedShouldUseSingleOp: Getter<boolean>,
@@ -143,6 +144,11 @@ export type ReactNativeFeatureFlags = $ReadOnly<{
143144
*/
144145
export const jsOnlyTestFlag: Getter<boolean> = createJavaScriptFlagGetter('jsOnlyTestFlag', false);
145146

147+
/**
148+
* When enabled, the JS Animated layer defers the start of native-driven timing animations to the first rendered frame and re-anchors timing to prevent skipping initial frames when the UI thread is busy with layout work.
149+
*/
150+
export const animatedDeferStartOfTimingAnimations: Getter<boolean> = createJavaScriptFlagGetter('animatedDeferStartOfTimingAnimations', false);
151+
146152
/**
147153
* Enables an experimental flush-queue debouncing in Animated.js.
148154
*/

0 commit comments

Comments
 (0)