From 7c2f33369201960005d48134865cf73e014bb7cb Mon Sep 17 00:00:00 2001 From: logustra <logustra@gmail.com> Date: Wed, 1 Apr 2020 02:05:56 +0700 Subject: [PATCH 1/3] fix: button animation --- src/components/Button.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/Button.tsx b/src/components/Button.tsx index 72a429a8b5..5478ca9ba5 100644 --- a/src/components/Button.tsx +++ b/src/components/Button.tsx @@ -139,6 +139,7 @@ class Button extends React.Component<Props, State> { Animated.timing(this.state.elevation, { toValue: 8, duration: 200 * scale, + useNativeDriver: true, }).start(); } }; @@ -149,6 +150,7 @@ class Button extends React.Component<Props, State> { Animated.timing(this.state.elevation, { toValue: 2, duration: 150 * scale, + useNativeDriver: true, }).start(); } }; From 29703a028fd390788c728e16185f8045a2bad81e Mon Sep 17 00:00:00 2001 From: logustra <logustra@gmail.com> Date: Sun, 5 Apr 2020 11:49:28 +0700 Subject: [PATCH 2/3] fix: disable useNativeDriver on ios --- src/components/Button.tsx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/components/Button.tsx b/src/components/Button.tsx index 5478ca9ba5..5b2a991ea0 100644 --- a/src/components/Button.tsx +++ b/src/components/Button.tsx @@ -1,5 +1,6 @@ import * as React from 'react'; import { + Platform, Animated, View, ViewStyle, @@ -139,7 +140,10 @@ class Button extends React.Component<Props, State> { Animated.timing(this.state.elevation, { toValue: 8, duration: 200 * scale, - useNativeDriver: true, + useNativeDriver: Platform.select({ + ios: false, + default: true, + }), }).start(); } }; @@ -150,7 +154,10 @@ class Button extends React.Component<Props, State> { Animated.timing(this.state.elevation, { toValue: 2, duration: 150 * scale, - useNativeDriver: true, + useNativeDriver: Platform.select({ + ios: false, + default: true, + }), }).start(); } }; From 9556b97a86921e527e55270a3bd1a5a17f178485 Mon Sep 17 00:00:00 2001 From: Dawid Urbaniak <dawidu@onet.pl> Date: Wed, 8 Apr 2020 14:41:28 +0200 Subject: [PATCH 3/3] fix: fix eslint and typescript --- src/components/Button.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/Button.tsx b/src/components/Button.tsx index 8739c248cd..5478ca9ba5 100644 --- a/src/components/Button.tsx +++ b/src/components/Button.tsx @@ -1,6 +1,5 @@ import * as React from 'react'; import { - Platform, Animated, View, ViewStyle,