FlatList requires string as key #19237
Labels
Component: FlatList
Resolution: Locked
This issue was locked by the bot.
Type: Discussion
Long running discussion.
Environment
Environment:
OS: macOS Sierra 10.12.6
Node: 9.8
Packages: (wanted => installed)
react: 16.3.1 => 16.3.1
react-native: 0.55.2 => 0.55.2
Expected Behavior
In a recent update,
FlatList
API is changed to require strings as keys.Why is this breaking change implemented?
Many apps use an unique number id (eg. user id, item id) as the key.
Shouldn't any necessary casting be done internally within RN rather than requiring apps to do it?
The API change also makes the
key
requirement inFlatList
inconsistent (more stringent) with keys used in array of components produced bymap
etc.The text was updated successfully, but these errors were encountered: