feat(site): add onInit hook example

This commit is contained in:
Ayo Ayco 2025-03-09 01:05:35 +01:00
parent 6e30abbaa0
commit b1cfdb4a9f

View file

@ -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}>