Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

componentWillMount warning #26

Open
libasoles opened this issue Aug 11, 2019 · 1 comment
Open

componentWillMount warning #26

libasoles opened this issue Aug 11, 2019 · 1 comment

Comments

@libasoles
Copy link

libasoles commented Aug 11, 2019

Great library.
Just to let you know that it now raises a warning regarding react lifecycle method componentWillMount. It is being deprecated.

@libasoles libasoles changed the title componentWillUnmount warning componentWillMount warning Aug 11, 2019
@libasoles
Copy link
Author

Moving this block inside constructor does the trick:

componentWillMount() {
    this.gestureHandlers = PanResponder.create({
      onStartShouldSetPanResponder: this._handleStartShouldSetPanResponder,
      onMoveShouldSetPanResponder: this._handleMoveShouldSetPanResponder,
      onPanResponderGrant: this._handlePanResponderGrant,
      onPanResponderMove: this._handlePanResponderMove,
      onPanResponderRelease: this._handlePanResponderEnd,
      onPanResponderTerminationRequest: evt => true,
      onShouldBlockNativeResponder: evt => false
    });
  }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant