You need to return the Key like this
keyExtractor={(item, index) => {
return item.id;
}}
No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.
General Tech 10 Answers
General Tech 7 Answers
General Tech 3 Answers
General Tech 9 Answers
return
, else is the same. I am following a tutorial, but the tutor does not return item.id, he simply gives the item.id like I did, but how didn't he get any error, without returning key? – ganeshdeshmukh 22 hours agoindex as key
instead ofitem.id
– ganeshdeshmukh 21 hours agokeyExtractor={(value, index) => index.toString()}
if you don't use any braces it will simply return the result – Rishabh Rawat21 hours ago