๋ณธ๋ฌธ์œผ๋กœ ๊ฑด๋„ˆ๋›ฐ๊ธฐ

[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?