[Medium] π Best Practices
1. Why you shouldn't use index as a key in lists and iterators?β
Why shouldn't you use
indexas thekeyvalue?
In interview questions for frameworks like Vue and React, this topic appears very often:
- What happens if there is no key in
v-for? - Why you shouldn't use
indexas a key inReactlists and iterators?