react-native-action-button icon indicating copy to clipboard operation
react-native-action-button copied to clipboard

When component re-render, the app is giving a warning

Open dbyilmaz opened this issue 8 years ago • 0 comments

I want to solve this warning. When my component re-render, the app is giving a warning. @mastermoo Warning :

** ExceptionsManager.js:73 Warning: Can only update a mounted or mounting component. This usually means you called setState, replaceState, or forceUpdate on an unmounted component. This is a no-op.

Please check the code for the ActionButton component. **

Code: //ActionButton.js line: 314

  reset(animate = true) {
    if (this.props.onReset) this.props.onReset();

    if (animate) {
      Animated.spring(this.anim, { toValue: 0 }).start();
    } else {
      this.anim.setValue(0);
    }

    setTimeout(
      () => this.setState({ active: false, resetToken: this.state.resetToken }),
      250
    );
  }

dbyilmaz avatar Nov 29 '17 08:11 dbyilmaz