Getting key prop warning in React, even though key is set

前端 未结 5 1347
死守一世寂寞
死守一世寂寞 2021-01-07 16:29

Problem

I\'m getting this warning:

Warning: Each child in an array or iterator should have a unique \"key\" prop. Check the render method of

5条回答
  •  -上瘾入骨i
    2021-01-07 17:16

    Check if variable that you pass to key is defined, because if it's undefined then error will be same, but it looks like code should work.

提交回复
热议问题