Skip to content

Commit c3bd624

Browse files
Chang Liu (RL)facebook-github-bot
authored andcommitted
Back out "(Redo PR facebook#51264) Remove native animation fabric sync in JS and infinite animation loop workaround" (facebook#51933)
Summary: ## Changelog: [General] [Changed] - Revert a previous change that caused UI regression Pull Request resolved: facebook#51933 Reverting for the same reason as D75108344. Original commit changeset: 966e2b187f43 Original Phabricator Diff: D75789100 Reviewed By: zijunl Differential Revision: D76352826 fbshipit-source-id: bfae95e2fe66b19b9d615eb5290c0ca5964088e3
1 parent c395780 commit c3bd624

2 files changed

Lines changed: 3 additions & 9 deletions

File tree

packages/react-native/Libraries/Animated/animations/Animation.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import type AnimatedNode from '../nodes/AnimatedNode';
1313
import type AnimatedValue from '../nodes/AnimatedValue';
1414

1515
import NativeAnimatedHelper from '../../../src/private/animated/NativeAnimatedHelper';
16-
import * as ReactNativeFeatureFlags from '../../../src/private/featureflags/ReactNativeFeatureFlags';
1716
import AnimatedProps from '../nodes/AnimatedProps';
1817

1918
export type EndResult = {
@@ -150,10 +149,8 @@ export default class Animation {
150149
if (value != null) {
151150
animatedValue.__onAnimatedValueUpdateReceived(value, offset);
152151

153-
if (!ReactNativeFeatureFlags.cxxNativeAnimatedEnabled()) {
154-
if (this.__isLooping === true) {
155-
return;
156-
}
152+
if (this.__isLooping === true) {
153+
return;
157154
}
158155

159156
// Once the JS side node is synced with the updated values, trigger an

packages/react-native/src/private/animated/createAnimatedPropsHook.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,7 @@ export default function createAnimatedPropsHook(
132132
if (node.__isNative) {
133133
// Check 2: this is an animation driven by native.
134134
// In native driven animations, this callback is only called once the animation completes.
135-
if (
136-
isFabricNode &&
137-
!ReactNativeFeatureFlags.cxxNativeAnimatedEnabled()
138-
) {
135+
if (isFabricNode) {
139136
// Call `scheduleUpdate` to synchronise Fiber and Shadow tree.
140137
// Must not be called in Paper.
141138
scheduleUpdate();

0 commit comments

Comments
 (0)