React Unique Keys requirement

175 Views Asked by At

I'm running through the starterapp in the GrandStack.IO Grandstack repo

Everything comes up and renders, but I'm getting the warning:

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

Check the render method of `RecentReviews`.
    in WithStyles(ForwardRef(TableRow)) (at RecentReviews.js:48)
    in RecentReviews (at Dashboard.js:48)

I've read all I can about this, which essentially means a component which loops should have a unique id. Makes sense. However, the table row on line 48 DOES have a key

   <TableBody>
          {data.Review.map((row) => (         <--this is line 48
            <TableRow key={row.id}>
              <TableCell>{row.date.formatted}</TableCell>
              <TableCell>{row.business.name}</TableCell>
              <TableCell>{row.user.name}</TableCell>
              <TableCell>{row.text}</TableCell>
              <TableCell align="right">{row.stars}</TableCell>
            </TableRow>
          ))}
        </TableBody>

What the heck am I missing?

0

There are 0 best solutions below