react.dev
react.dev copied to clipboard
Recommend eslint:no-label for functional setState
trafficstars
this is a pretty common mistake when using the functional form of setState:

and we have no warning in React (yet) for this when it happens. easiest guard is having eslint:no-label tell you about it. Should we add a mention in the setState docs?