update docs re:onbeforeremove and clean up

This commit is contained in:
Leo Horie 2016-12-26 12:28:13 -05:00
parent 78b9a082ac
commit bedcd8bdbf
5 changed files with 14 additions and 18 deletions

View file

@ -63,9 +63,12 @@ var ComponentWithHooks = {
onupdate: function(vnode) {
console.log("DOM updated")
},
onbeforeremove: function(vnode, done) {
onbeforeremove: function(vnode) {
console.log("exit animation can start")
done()
return new Promise(function(resolve) {
// call after animation completes
resolve()
})
},
onremove: function(vnode) {
console.log("removing DOM element")