Skip to main content

๐Ÿ“„ 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?