jsx-eslint/eslint-plugin-react
View on GitHubwarn when using setState in constructor
Open
#2,371 opened on Aug 5, 2019
acceptedhelp wantednew rule
Repository metrics
- Stars
- (8,630 stars)
- PR merge metrics
- (No merged PRs in 30d)
Description
Obviously it could have been used by functions called from the constructor, but using setState in constructor is always an issue in react and causes a warning in debug mode.