Why list items need unique key, but other not, in react?

前端 未结 0 662
余生分开走
余生分开走 2021-01-13 19:52

Why do rendering list items need to pass a key prop while other elements don\'t?

For example, if I do like -

[\'apple\', \'orange\', \'lemon\'].map((fr         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题