From 476ee00f1bbf09d76df96f2e60029ad076af43c9 Mon Sep 17 00:00:00 2001 From: Fahmi Ahmad Date: Fri, 23 Oct 2020 14:40:25 +0700 Subject: [PATCH 1/2] Fix Animated errors This commit fix Animated: `useNativeDriver` was not specified. This is a required option and must be explicitly set to `true` or `false` --- ActionButton.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ActionButton.js b/ActionButton.js index ec1b9e3..62a6eee 100644 --- a/ActionButton.js +++ b/ActionButton.js @@ -35,13 +35,13 @@ const ActionButton = props => { useEffect(() => { if (props.active) { - Animated.spring(anim.current, { toValue: 1 }).start(); + Animated.spring(anim.current, { toValue: 1, useNativeDriver: false },).start(); setActive(true); setResetToken(props.resetToken); } else { props.onReset && props.onReset(); - Animated.spring(anim.current, { toValue: 0 }).start(); + Animated.spring(anim.current, { toValue: 0, useNativeDriver: false }).start(); timeout.current = setTimeout(() => { setActive(false); setResetToken(props.resetToken); @@ -254,7 +254,7 @@ const ActionButton = props => { if (active) return reset(animate); if (animate) { - Animated.spring(anim.current, { toValue: 1 }).start(); + Animated.spring(anim.current, { toValue: 1, useNativeDriver: false }).start(); } else { anim.current.setValue(1); } @@ -266,7 +266,7 @@ const ActionButton = props => { if (props.onReset) props.onReset(); if (animate) { - Animated.spring(anim.current, { toValue: 0 }).start(); + Animated.spring(anim.current, { toValue: 0, useNativeDriver: false }).start(); } else { anim.current.setValue(0); } From 008f694e6878f7db1e392d614b7eb38d310fca95 Mon Sep 17 00:00:00 2001 From: Fahmi Ahmad Date: Fri, 11 Dec 2020 10:04:02 +0700 Subject: [PATCH 2/2] Update index.d.ts --- index.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.d.ts b/index.d.ts index 2ba74e9..c956f11 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,12 +1,12 @@ import * as React from 'react' import { ViewStyle, - ViewProperties, + ViewProps, TextStyle } from 'react-native' -export interface ActionButtonProperties extends ViewProperties { +export interface ActionButtonProperties extends ViewProps { resetToken?: any, active?: boolean, @@ -40,7 +40,7 @@ export interface ActionButtonProperties extends ViewProperties { nativeFeedbackRippleColor?: string } -export interface ActionButtonItemProperties extends ViewProperties { +export interface ActionButtonItemProperties extends ViewProps { size?: number, title?: string onPress?: () => void