Browse Source

Update faq-ajax.md (#3363)

Changed item.name in key property to item.id
main
krizinx 4 years ago
committed by GitHub
parent
commit
ab2e95f0ce
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      content/docs/faq-ajax.md

4
content/docs/faq-ajax.md

@ -72,7 +72,7 @@ class MyComponent extends React.Component {
return (
<ul>
{items.map(item => (
<li key={item.name}>
<li key={item.id}>
{item.name} {item.price}
</li>
))}
@ -120,7 +120,7 @@ function MyComponent() {
return (
<ul>
{items.map(item => (
<li key={item.name}>
<li key={item.id}>
{item.name} {item.price}
</li>
))}

Loading…
Cancel
Save