当前位置:网站首页>Warning: Each child in a list should have a unique “key“ prop.

Warning: Each child in a list should have a unique “key“ prop.

2022-06-11 06:21:00 Geek student

 Insert picture description here
Warning: Each child in a list should have a unique “key” prop.

Warning : Each child on the list should have a unique “ The key ” attribute .

reason : This is because there is no one added during the component traversal key To distinguish each component , because dom need deff Contrast

Loop through the generated components , take key Set to index that will do
 Insert picture description here Add to the outermost layer of the loop

原网站

版权声明
本文为[Geek student]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/03/202203020527521530.html