Jm-Paunlagui / Matrix-Lab-Client

Avoid using an element's index as the key prop JS-0437
Bug risk
Major
a year ago2 years old
Do not use Array index in keys
 135          </thead>
 136          <tbody>
 137            {data.slice(0, rowCount).map((row, index) => (
 138              <tr className="bg-white" key={index}> 139                {Object.values(row).map((cell, cellIndex) => (
 140                  <td
 141                    className="px-4 py-2 text-gray-500 truncate"
Do not use Array index in keys
 139                {Object.values(row).map((cell, cellIndex) => (
 140                  <td
 141                    className="px-4 py-2 text-gray-500 truncate"
 142                    key={cellIndex} 143                  >
 144                    {cell}
 145                  </td>