jsx-eslint/eslint-plugin-react

warn when using setState in constructor

Open

#2,371 创建于 2019年8月5日

在 GitHub 查看
 (3 评论) (0 反应) (0 负责人)JavaScript (8,630 star) (2,797 fork)batch import
acceptedhelp wantednew rule

描述

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.

贡献者指南