Merge pull request #1505 from bruce-one/patch-3
Recommend usage of fragments
This commit is contained in:
commit
b779f3cbb4
1 changed files with 1 additions and 3 deletions
|
|
@ -132,9 +132,7 @@ users.map(function(u) {
|
|||
|
||||
// PREFER
|
||||
users.map(function(u) {
|
||||
return {tag: "[", key: u.id, children: [
|
||||
m("button", u.name)
|
||||
]}
|
||||
return m.fragment({key: u.id}, m("button", u.name))
|
||||
})
|
||||
```
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue