Docs - prioritize closure components for state (#2292)
* Emphasize closure components in components.md * Use closure components for all stateful component examples * Add change-log entry * Edits and separate sections for closure, class & POJO state
This commit is contained in:
parent
4ac33fa483
commit
a147023f4e
6 changed files with 213 additions and 101 deletions
|
|
@ -539,7 +539,7 @@ Instead, prefer using Javascript expressions such as the ternary operator and Ar
|
|||
```javascript
|
||||
// PREFER
|
||||
var BetterListComponent = {
|
||||
view: function() {
|
||||
view: function(vnode) {
|
||||
return m("ul", vnode.attrs.items.map(function(item) {
|
||||
return m("li", item)
|
||||
}))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue