Skip to content

Commit b47c2d0

Browse files
Update sectionlist.md for keyExtractor (facebook#4341)
keyExtractor in sectionlist checks for item.key first. If it is not present it checks for item.id. If item.id is not present then it falls back to index.
1 parent 6af7f71 commit b47c2d0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/sectionlist.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ Rendered in between each item, but not at the top or bottom. By default, `highli
179179

180180
### `keyExtractor`
181181

182-
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. Note that this sets keys for each item, but each overall section still needs its own key.
182+
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 `item.id`, and then 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.
183183

184184
| Type |
185185
| --------------------------------------- |

0 commit comments

Comments
 (0)