stencil: add lifecycle hooks example
This commit is contained in:
parent
44a04b5fa9
commit
aa8423aab0
12
stencil.md
12
stencil.md
|
@ -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)_
|
||||
|
|
Loading…
Reference in New Issue