[Medium] 📄 Best Practices
1. Why you shouldn't use index as a key in lists and iterators?
为什么不应该使用
index作为key值?
在 Vue、React 等框架的面试题目中都会有类似的题目:
- What happens if there is no key in
v-for? - Why you shouldn't use
indexas a key inReactlists and iterators?