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

Disable setState warnings for didX hooks #56

Closed
glebec opened this issue Jun 11, 2018 · 1 comment · Fixed by #58
Closed

Disable setState warnings for didX hooks #56

glebec opened this issue Jun 11, 2018 · 1 comment · Fixed by #58

Comments

@glebec
Copy link
Member

glebec commented Jun 11, 2018

'react/no-did-mount-set-state': 1, // Prevent usage of setState in componentDidMount
'react/no-did-update-set-state': 1, // Prevent usage of setState in componentDidUpdate

More annoying than helpful, especially with async funcs throwing false positives.

See jsx-eslint/eslint-plugin-react#596

@fterdal
Copy link
Contributor

fterdal commented Jun 28, 2018

I heartily agree with this, and I've had several students complain about this in particular.

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

Successfully merging a pull request may close this issue.

2 participants