Skip to content

Commit

Permalink
fix example wording
Browse files Browse the repository at this point in the history
  • Loading branch information
kentcdodds committed Mar 23, 2020
1 parent e84b1a8 commit 2c1d752
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/exercise/09.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,15 @@ const ui = (
)
```

Then that's no problem, but rending an array of elements is very common:
But it's really common to have a list of items in an array and attempt to render
them by mapping them each to a React element like this:

```jsx
const list = ['One', 'Two', 'Three']

const ui = (
<ul>
{list.map(listItem => (
<li>{listItem}</li>
))}
</ul>
)
const lis = list.map(listItem => <li>{listItem}</li>)

const ui = <ul>{lis}</ul>
```

Those will generate the same HTML, but what it actually does is slightly
Expand Down

0 comments on commit 2c1d752

Please sign in to comment.