Skip to content

Commit

Permalink
Fix no-array-index-key typo
Browse files Browse the repository at this point in the history
  • Loading branch information
dguo committed Feb 5, 2017
1 parent c97dd0f commit 8e207b8
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 8e207b8

Please sign in to comment.