Skip to content

Commit 8d0c958

Browse files
insinyyx990803
authored andcommitted
Make the React example less esoteric (#368)
1 parent 794b3b6 commit 8d0c958

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

src/guide/comparison.md

+7-12
Original file line numberDiff line numberDiff line change
@@ -59,19 +59,14 @@ render () {
5959
const { items } = this.props
6060

6161
return (
62-
<div className='list-container'>{
63-
items.length
64-
? <ul>{
65-
items.map(item => {
66-
return (
67-
<li key={item.id}>
68-
{ item.name }
69-
</li>
70-
)
71-
})
72-
}</ul>
62+
<div className='list-container'>
63+
{items.length
64+
? <ul>
65+
{items.map(item => <li key={item.id}>{item.name}</li>)}
66+
</ul>
7367
: <p>No items found.</p>
74-
}</div>
68+
}
69+
</div>
7570
)
7671
}
7772
```

0 commit comments

Comments
 (0)