Skip to content

Commit

Permalink
Merge pull request #1062 from dguo/patch-2
Browse files Browse the repository at this point in the history
Fix no-array-index-key typo
  • Loading branch information
lencioni committed Feb 5, 2017
2 parents c97dd0f + 8e207b8 commit c586273
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/rules/no-array-index-key.md
Expand Up @@ -4,7 +4,7 @@ Warn if an element uses an Array index in its `key`.

The `key` is used by React to [identify which items have changed, are added, or are removed and should be stable](https://facebook.github.io/react/docs/lists-and-keys.html#keys).

It's a bad idea to use the array index since it doesn't uniquely identify your elements. In cases where the array is sorted or an element is added to the beginning of the array, the index will be changed even though the element representing that index may be the same. This results in in unnecessary renders.
It's a bad idea to use the array index since it doesn't uniquely identify your elements. In cases where the array is sorted or an element is added to the beginning of the array, the index will be changed even though the element representing that index may be the same. This results in unnecessary renders.

## Rule Details

Expand Down

0 comments on commit c586273

Please sign in to comment.