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

前端 未结 1 1760
小鲜肉
小鲜肉 2020-12-05 07:55

I\'m building an app using the google books API and I appear to be passing a unique key to each child in the list, but the error won\'t go away. I must be doing something wr

1条回答
  •  旧时难觅i
    2020-12-05 08:26

    The key needs to go on the outermost returned element. In your specific case, that means changing this:

                

    to this:

                

    0 讨论(0)
提交回复
热议问题