#error Each child in a list should have a unique key
9 messages · Page 1 of 1 (latest)
I notice you're using game.id in one place and game.game_id in another - are you sure that's the right prop?
@scenic shadow i made adjustments and the error is gone, the table is not displaying on the website tho here is the new code
(
<h1> Games </h1>
<table>
<tbody>
{games.map(game =>
<tr key={game.gameStatusId}>
<td key ={game.gameStatusId}> {(game.gameStatusId)} </td>
<td>
<button
>JOIN
</button>
</td>
</tr>)}
</tbody>
</table>
</>
);
}
None of the games have the same id, its a uique uuid
"gameStatusId" is also a uuid?
Not sure then. If it's actually unique, you shouldn't be getting the error about duplicate keys.