I'm following the ReactNative tutorial on SectionLists (https://facebook.github.io/react-native/docs/using-a-listview.html#content) and have run into a warning message.
The warnings state
"Warning: VirtualizedSectionList: A section
you supplied is missing the key
property.
"VirtualizedList: missing keys for items, make sure to specify a key property on each item or provide a custom keyExtractor"
Can someone assist in resolving this warning?
Edit So I was able to resolve the first warning by adding a key to the sections
sections={[
{key: 'D', title: 'D', data: ['Devin']},
{key: 'J', title: 'J', data: ['Jackson', 'James', 'Jillian', 'Jimmy', 'Joel', 'John', 'Julie']},
]}
But am stilling getting the second error for 1 instance.
I came across the same error before. Defining the keyExtractor property solved it for me.
https://facebook.github.io/react-native/docs/sectionlist.html#keyextractor
Have you tried this yet?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With