jsx-eslint/eslint-plugin-react

warn when using setState in constructor

Open

#2 371 ouverte le 5 août 2019

Voir sur GitHub
 (3 commentaires) (0 réactions) (0 assignés)JavaScript (2 797 forks)batch import
acceptedhelp wantednew rule

Métriques du dépôt

Stars
 (8 630 stars)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

Description

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.

Guide contributeur