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.

貢獻者指南