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
|
// PREFER
|
||||||
users.map(function(u) {
|
users.map(function(u) {
|
||||||
return {tag: "[", key: u.id, children: [
|
return m.fragment({key: u.id}, m("button", u.name))
|
||||||
m("button", u.name)
|
|
||||||
]}
|
|
||||||
})
|
})
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue