remove ambiguity in oncreate hook docs

This commit is contained in:
Leo 2016-11-01 23:30:29 -04:00
parent 6a8295b585
commit 387a69615d
2 changed files with 3 additions and 2 deletions

3
.gitignore vendored
View file

@ -1,5 +1,6 @@
coverage
node_modules
jsconfig.json
.vscode
npm-debug.log
.vscode
.DS_Store

View file

@ -83,7 +83,7 @@ You should not modify model data synchronously from this method. Since `oninit`
The `oncreate(vnode)` hook is called after a DOM element is created and attached to the document. `oncreate` is guaranteed to run at the end of the render cycle, so it is safe to read layout values such as `vnode.dom.offsetHeight` and `vnode.dom.getBoundingClientRect()` from this method.
This hook does not get called when an element is updated, but it does get called if an element is recycled.
This hook does not get called when an element is updated.
Like in other hooks, the `this` keyword in the `oncreate` callback points to `vnode.state`. DOM elements whose vnodes have an `oncreate` hook do not get recycled.