From 1714c1701286fe398137280ff6d5b343bc016323 Mon Sep 17 00:00:00 2001 From: Bernhard Wittmann Date: Thu, 10 Jun 2021 09:21:33 +0200 Subject: [PATCH] useNativeDriver in Animation restart on update This library causes a lot of warnings, since `useNativeDriver` is a required property in Animated.timing. So i added `useNativeDriver` in the Animation in `componentDidUpdate` according to the other uses. --- src/components/indicator/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/indicator/index.js b/src/components/indicator/index.js index b2de0a8..4e34f3b 100644 --- a/src/components/indicator/index.js +++ b/src/components/indicator/index.js @@ -77,7 +77,7 @@ export default class Indicator extends PureComponent { let { hideAnimationDuration: duration } = this.props; Animated - .timing(hideAnimation, { toValue: animating? 1 : 0, duration }) + .timing(hideAnimation, { toValue: animating? 1 : 0, duration, useNativeDriver: true }) .start(); } }