From b1cfdb4a9f03d7cb12409ed1c220e0bff17e9227 Mon Sep 17 00:00:00 2001 From: Ayo Ayco Date: Sun, 9 Mar 2025 01:05:35 +0100 Subject: [PATCH] feat(site): add onInit hook example --- site/src/pages/index.html | 3 +++ 1 file changed, 3 insertions(+) diff --git a/site/src/pages/index.html b/site/src/pages/index.html index 3361daa..0e8ff88 100644 --- a/site/src/pages/index.html +++ b/site/src/pages/index.html @@ -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}>