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:
spacejack 2018-11-13 01:04:04 -05:00 committed by Isiah Meadows
parent 4ac33fa483
commit a147023f4e
6 changed files with 213 additions and 101 deletions

View file

@ -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)
}))