Skip to content
This repository has been archived by the owner on Aug 20, 2018. It is now read-only.

Warn on setState #3

Closed
grossbart opened this issue Aug 27, 2015 · 2 comments
Closed

Warn on setState #3

grossbart opened this issue Aug 27, 2015 · 2 comments

Comments

@grossbart
Copy link

Version 3.3.0 of ESLint supports warning on setState.

jsx-eslint/eslint-plugin-react#197

@tpreusse
Copy link
Contributor

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.

@jstcki
Copy link
Contributor

jstcki commented Sep 2, 2015

I'm also against this. This will become even less relevant once React supports pure functions as components (which don't have setState).

@jstcki jstcki closed this as completed Sep 2, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants