Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

组件key使用index问题 #15

Open
erchuanliu opened this issue Jan 3, 2024 · 0 comments
Open

组件key使用index问题 #15

erchuanliu opened this issue Jan 3, 2024 · 0 comments

Comments

@erchuanliu
Copy link

在React开发中,遍历展示组件需要给组件添加key值,很多时候在返回的数据中没有唯一的key值,这时候常常使用数组的索引作为组件的key。现在的校验规则中使用数组下标作为组件的key会提示react/no-array-index-key类型的Error,看是否可以优化此规则。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant