feat(site): add onInit hook example
This commit is contained in:
parent
6e30abbaa0
commit
b1cfdb4a9f
1 changed files with 3 additions and 0 deletions
|
@ -123,6 +123,9 @@ export class Counter extends WebComponent {
|
|||
static props = {
|
||||
count: 0
|
||||
}
|
||||
onInit() {
|
||||
// do something...
|
||||
}
|
||||
get template() {
|
||||
return html`
|
||||
<button onClick=${() => ++this.props.count}>
|
||||
|
|
Loading…
Reference in a new issue