Skip to content

componentWillReceiveProps has been renamed + useNativeDriver#380

Description

@CarmineRumma

Hi! 馃憢

Firstly, thanks for your work on this project! 馃檪
In order to solve the warnings as per issue's title,
here is the diff that solved them:

diff --git a/node_modules/react-native-action-button/ActionButton.js b/node_modules/react-native-action-button/ActionButton.js
index b8306c2..9e3d453 100644
--- a/node_modules/react-native-action-button/ActionButton.js
+++ b/node_modules/react-native-action-button/ActionButton.js
@@ -39,7 +39,7 @@ export default class ActionButton extends Component {
     clearTimeout(this.timeout);
   }
 
-  componentWillReceiveProps(nextProps) {
+  componentDidUpdate(nextProps) {
     if (nextProps.resetToken !== this.state.resetToken) {
       if (nextProps.active === false && this.state.active === true) {
         if (this.props.onReset) this.props.onReset();
@@ -316,7 +316,7 @@ export default class ActionButton extends Component {
     if (this.state.active) return this.reset();
 
     if (animate) {
-      Animated.spring(this.anim, { toValue: 1 }).start();
+      Animated.spring(this.anim, { toValue: 1, useNativeDriver: false }).start();
     } else {
       this.anim.setValue(1);
     }
@@ -328,7 +328,7 @@ export default class ActionButton extends Component {
     if (this.props.onReset) this.props.onReset();
 
     if (animate) {
-      Animated.spring(this.anim, { toValue: 0 }).start();
+      Animated.spring(this.anim, { toValue: 0, useNativeDriver: false }).start();
     } else {
       this.anim.setValue(0);
     }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions