본문으둜 κ±΄λ„ˆλ›°κΈ°

[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 index as a key in React lists and iterators?