Skip to main content

defaultKeyIdExtractor

Content

Used to provide string value of id from items as key for the keyExtractor property of FlatList or SectionList.

Used as default property in FlatListWrapper and SectionListWrapper:

FlatListWrapper.defaultProps = {
keyExtractor: defaultKeyIdExtractor,
};

SectionListWrapper.defaultProps = {
keyExtractor: defaultKeyIdExtractor,
};

Params

NameTypeRequiredDefault valueDescription
itemT extends {id: string or number}--Item which has id and will be used as key