-
Notifications
You must be signed in to change notification settings - Fork 76
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
New rule: react-set-state-with-function #80
Comments
From reading these docs the first approach it fine, as long as there are no occurences of |
I don't know much about tslint and tsutils API, so that may be not feasible, but I think the ideal would be that the rule allows objects if props and state aren't used and enforce callback usage otherwise. Does that sound feasible? |
It seems like disallowing |
From what I understand, the rule suggested in #172 is more flexible and covers more cases then this one. They have some overlap though and I can imagine a team deciding for this rule that might be simpler to implement and thus be more performent. So not sure if those two are duplicates or not. |
closing in favor of #172 |
Enforce usage of the callback form of
this.setState
The text was updated successfully, but these errors were encountered: