Skip to content

Commit 0bc18d3

Browse files
committed
change update key
1 parent 850cf4e commit 0bc18d3

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/App.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,19 +78,19 @@ function ResultsTable({ columns, values }) {
7878
<table>
7979
<thead>
8080
<tr>
81-
{columns.map((columnName) => (
82-
<td>{columnName}</td>
81+
{columns.map((columnName, i) => (
82+
<td key={i}>{columnName}</td>
8383
))}
8484
</tr>
8585
</thead>
8686

8787
<tbody>
8888
{
8989
// values is an array of arrays representing the results of the query
90-
values.map((row) => (
91-
<tr>
92-
{row.map((value) => (
93-
<td>{value}</td>
90+
values.map((row, i) => (
91+
<tr key={i}>
92+
{row.map((value, i) => (
93+
<td key={i}>{value}</td>
9494
))}
9595
</tr>
9696
))

0 commit comments

Comments
 (0)