update docs

This commit is contained in:
Leo Horie 2016-06-20 09:22:00 -04:00
parent b9ce90765d
commit ce0c30a235
11 changed files with 849 additions and 236 deletions

View file

@ -27,12 +27,12 @@ var ComponentWithHook = {
}
}
//Sample hook in vnode
// Sample hook in vnode
function initializeVnode() {
console.log("initialize vnode")
}
m(ComponentWithHook, {oninit: initializeVnode}})
m(ComponentWithHook, {oninit: initializeVnode})
```
All lifecyle methods receive the vnode as their first arguments, and have their `this` keyword bound to `vnode.state`.