Skip to content

Commit 8508da4

Browse files
zhongwuzwfacebook-github-bot
authored andcommitted
Disable animation native driver in AnimatedGratuisousApp of RNTester (#23172)
Summary: `Animated.event` not work with direct events and not bubbling events, which means it does not work with `PanResponder`, please see [Animation Caveats](https://facebook.github.io/react-native/docs/animations#caveats) Changelog: ---------- [General] [Fixed] - Disable animation native driver in AnimatedGratuisousApp of RNTester. Pull Request resolved: #23172 Differential Revision: D13838555 Pulled By: cpojer fbshipit-source-id: 866bc83e780d6712ffae5964615af44a72bf998c
1 parent b0302ec commit 8508da4

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

Diff for: RNTester/js/AnimatedGratuitousApp/AnExSet.js

-3
Original file line numberDiff line numberDiff line change
@@ -77,20 +77,17 @@ class AnExSet extends React.Component<Object, any> {
7777
inputRange: [0, 300], // and interpolate pixel distance
7878
outputRange: [1, 0], // to a fraction.
7979
}),
80-
useNativeDriver: true,
8180
}).start();
8281
},
8382
onPanResponderMove: Animated.event(
8483
[null, {dy: this.state.dismissY}], // track pan gesture
85-
{useNativeDriver: true},
8684
),
8785
onPanResponderRelease: (e, gestureState) => {
8886
if (gestureState.dy > 100) {
8987
this.props.onDismiss(gestureState.vy); // delegates dismiss action to parent
9088
} else {
9189
Animated.spring(this.props.openVal, {
9290
toValue: 1, // animate back open if released early
93-
useNativeDriver: true,
9491
}).start();
9592
}
9693
},

0 commit comments

Comments
 (0)