Skip to content

Commit

Permalink
Fix warning requires useNativeDriver to be explicitly declared (#197)
Browse files Browse the repository at this point in the history
  • Loading branch information
mandhu authored Apr 6, 2020
1 parent ea8d614 commit 8cfca24
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions withAnimation.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export default function withAnimation(WrappedComponent, indeterminateProgress) {
if (indeterminateProgress) {
Animated.spring(this.state.progress, {
toValue: indeterminateProgress,
useNativeDriver: false
}).start();
}
}
Expand All @@ -59,6 +60,7 @@ export default function withAnimation(WrappedComponent, indeterminateProgress) {
} else {
Animated.spring(this.state.rotation, {
toValue: this.rotationValue > 0.5 ? 1 : 0,
useNativeDriver: false
}).start(endState => {
if (endState.finished) {
this.state.rotation.setValue(0);
Expand All @@ -74,6 +76,7 @@ export default function withAnimation(WrappedComponent, indeterminateProgress) {
Animated.spring(this.state.progress, {
toValue: progress,
bounciness: 0,
useNativeDriver: false
}).start();
} else {
this.state.progress.setValue(progress);
Expand All @@ -93,6 +96,7 @@ export default function withAnimation(WrappedComponent, indeterminateProgress) {
duration: this.props.indeterminateAnimationDuration,
easing: Easing.linear,
isInteraction: false,
useNativeDriver: false
}).start(endState => {
if (endState.finished) {
this.spin();
Expand Down

0 comments on commit 8cfca24

Please sign in to comment.