Closed grossbart closed 9 years ago
Not too big of a fan of enabling this – I like saving e.g. calculated layouts in state (on will mount and will update) – stuff that I explicitly don't want to propagate up. Of course I could disable the rule for those dumb components but ESLint rules tend to make you adapt your style and avoid features it doesn't like.
I'm also against this. This will become even less relevant once React supports pure functions as components (which don't have setState
).
Version 3.3.0 of ESLint supports warning on
setState
.https://github.com/yannickcr/eslint-plugin-react/pull/197