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

Add no-unsafe rule #1830

Closed
sergei-startsev opened this issue Jun 17, 2018 · 1 comment
Closed

Add no-unsafe rule #1830

sergei-startsev opened this issue Jun 17, 2018 · 1 comment

Comments

@sergei-startsev
Copy link
Contributor

Certain legacy lifecycle methods are unsafe for use in async React applications and cause warnings in strict mode:

  • UNSAFE_componentWillMount
  • UNSAFE_componentWillReceiveProps
  • UNSAFE_componentWillUpdate.

These also happen to be the lifecycles that cause the most confusion within the React community. At the same time there're no deprecation warnings regarding using UNSAFE_ methods and it will still be possible to use them in React 17.

The rule prevents usage of of UNSAFE_ lifecycle methods. See discussion details #1750 (comment).

@sergei-startsev
Copy link
Contributor Author

The rule has been merged.

This was referenced Sep 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants