jsx-eslint/eslint-plugin-react

warn when using setState in constructor

Open

#2,371 建立於 2019年8月5日

在 GitHub 查看
 (3 留言) (0 反應) (0 負責人)JavaScript (2,797 fork)batch import
acceptedhelp wantednew rule

倉庫指標

Star
 (8,630 star)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

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.

貢獻者指南