jsx-eslint/eslint-plugin-react

[feat-request] prefer-create-ref

Open

#2 237 ouverte le 12 avr. 2019

Voir sur GitHub
 (1 commentaire) (4 réactions) (0 assignés)JavaScript (2 797 forks)batch import
help 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

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.

Guide contributeur