Skip to content

Commit 1bb323e

Browse files
skevyFacebook Github Bot
authored andcommitted
Use native animations in TouchableBounce and TouchableOpacity
Summary: Now that native animations for opacity and springs have landed in both iOS and Android, we can enable native animations both for TouchableBounce and TouchableOpacity. Closes #10583 Differential Revision: D4099819 Pulled By: lacker fbshipit-source-id: 247d7bff9a778e520af764f571caf6286b4a5749
1 parent 55ebb89 commit 1bb323e

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Libraries/Components/Touchable/TouchableBounce.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ var TouchableBounce = React.createClass({
8888
toValue: value,
8989
velocity,
9090
bounciness,
91+
useNativeDriver: true,
9192
}).start(callback);
9293
},
9394

Libraries/Components/Touchable/TouchableOpacity.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ var TouchableOpacity = React.createClass({
8787
setOpacityTo: function(value: number) {
8888
Animated.timing(
8989
this.state.anim,
90-
{toValue: value, duration: 150}
90+
{toValue: value, duration: 150, useNativeDriver: true}
9191
).start();
9292
},
9393

0 commit comments

Comments
 (0)