stencil: add lifecycle hooks example

This commit is contained in:
Rico Sta. Cruz 2017-10-11 11:25:09 +08:00
parent 44a04b5fa9
commit aa8423aab0
No known key found for this signature in database
GPG Key ID: CAAD38AE2962619A
1 changed files with 12 additions and 0 deletions

View File

@ -169,6 +169,8 @@ See: [Slots](https://stenciljs.com/docs/templating#slots)
## Lifecycle
### Lifecycle hooks
| Event | Description |
| --- | --- |
| `componentWilLLoad()` | Before rendering |
@ -181,6 +183,16 @@ See: [Slots](https://stenciljs.com/docs/templating#slots)
See: [Component lifecycle](https://stenciljs.com/docs/component-lifecycle)
### Example
```js
export class MyComponent {
componentWillUpdate () {
console.log('updating')
}
}
```
## References
- [Stencil docs](https://stenciljs.com/docs/) _(stenciljs.com)_