jsx-eslint/eslint-plugin-react

[feat-request] prefer-create-ref

Open

#2.237 geöffnet am 12. Apr. 2019

Auf GitHub ansehen
 (1 Kommentar) (4 Reaktionen) (0 zugewiesene Personen)JavaScript (2.797 Forks)batch import
help wantednew rule

Repository-Metriken

Stars
 (8.630 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

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.

Contributor Guide