docs: update with latest fixes (#2116)

This commit is contained in:
Pat Cavit 2018-04-12 00:11:11 -07:00 committed by GitHub
parent b9f65c2fdd
commit 6fb77b7771
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
28 changed files with 276 additions and 89 deletions

View file

@ -61,6 +61,9 @@ var ComponentWithHooks = {
oncreate: function(vnode) {
console.log("DOM created")
},
onbeforeupdate: function(vnode, old) {
return true
},
onupdate: function(vnode) {
console.log("DOM updated")
},
@ -74,9 +77,6 @@ var ComponentWithHooks = {
onremove: function(vnode) {
console.log("removing DOM element")
},
onbeforeupdate: function(vnode, old) {
return true
},
view: function(vnode) {
return "hello"
}
@ -177,7 +177,7 @@ They can be consumed in the same way regular components can.
m.render(document.body, m(closureComponent))
// EXAMPLE: via m.mount
m.mount(document.body, closuresComponent)
m.mount(document.body, closureComponent)
// EXAMPLE: via m.route
m.route(document.body, "/", {