Q. What is the correct way to use keys in a list?

किसी सूची में कुंजियों का उपयोग करने का सही तरीका क्या है?

A
<li key={index}>Item</li>
B
<li key={item.id}>Item</li>
C
<li key={Math.random()}>Item</li>
D
<li>Item</li>

Explanation

Explanation will be available soon. Please stay tuned.

व्याख्या जल्द ही उपलब्ध होगी। कृपया बने रहें।

Invest in Future Achievers

Your support helps keep Exam Achiever 100% free for students preparing for exams.

Thanks for your support!

Comments

Leave a Comment