Understanding unique keys for array children in React.js

后端 未结 12 1295
时光取名叫无心
时光取名叫无心 2020-11-21 05:45

I\'m building a React component that accepts a JSON data source and creates a sortable table.
Each of the dynamic data rows has a unique key assigned to it but I\'m stil

12条回答
  •  逝去的感伤
    2020-11-21 06:31

    Check: key = undef !!!

    You got also the warn message:

    Each child in a list should have a unique "key" prop.
    

    if your code is complete right, but if on

    
    

    someValue is undefined!!! Please check this first. You can save hours.

提交回复
热议问题