Browse files

Update sectionList keyExtractor docs

Added language to explain that you still need to add keys for each section even if you use a keyExtractor method.

No code changed; just clarified documentation.
Closes #15007

Differential Revision: D5425897

Pulled By: hramos

fbshipit-source-id: db44064a28a673feeda5a6765ea45217d3ae51e2
  • Loading branch information...
fourestfire authored and facebook-github-bot committed Jul 14, 2017
1 parent ccb4e67 commit cb9b266b8eae663191750b80ec4f8d6ad6d2878a
Showing with 2 additions and 1 deletion.
  1. +2 −1 Libraries/Lists/SectionList.js
@@ -129,7 +129,8 @@ type OptionalProps<SectionT: SectionBase<any>> = {
* Used to extract a unique key for a given item at the specified index. Key is used for caching
* and as the react key to track item re-ordering. The default extractor checks item.key, then
* falls back to using the index, like react does.
* falls back to using the index, like react does. Note that this sets keys for each item, but
* each overall section still needs its own key.
keyExtractor: (item: Item, index: number) => string,

0 comments on commit cb9b266

Please sign in to comment.