jsx-eslint/eslint-plugin-react

[feat-request] prefer-create-ref

Open

#2237 aperta il 12 apr 2019

Vedi su GitHub
 (1 commento) (4 reazioni) (0 assegnatari)JavaScript (2797 fork)batch import
help wantednew rule

Metriche repository

Star
 (8630 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

This is a feature request. In React it is possible to create references to elements in 3 different ways, including one deprecated (string refs, for this there is the no-string-refs rule). To improve consistency of what approach to be used for refs it would be nice to have a prefer-create-ref rule, maybe other naming also in favor of callback refs.

Guida contributor