jsx-eslint/eslint-plugin-react

[feat-request] prefer-create-ref

Open

#2,237 创建于 2019年4月12日

在 GitHub 查看
 (1 评论) (4 反应) (0 负责人)JavaScript (2,797 fork)batch import
help wantednew rule

仓库指标

Star
 (8,630 star)
PR 合并指标
 (30 天内没有已合并 PR)

描述

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.

贡献者指南