Skip to content

Commit dc737cb

Browse files
Chang Liu (RL)facebook-github-bot
authored andcommitted
Back out "Remove native animation fabric sync in JS and infinite animation loop workaround" (#51486)
Summary: Pull Request resolved: #51486 Original commit changeset: 5b313a5e8c07 Original Phabricator Diff: D74198568 Fix the issue that dropdown menus in HSR worlds menu are not clickable. Reviewed By: xieswufe Differential Revision: D75108344 fbshipit-source-id: d134ff9287929f8e1fc0995acf2b884d6a67131c
1 parent 3cb70bb commit dc737cb

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)