diff --git a/demo/HelloWorld.mjs b/demo/HelloWorld.mjs
index 40ed12e..6483f72 100644
--- a/demo/HelloWorld.mjs
+++ b/demo/HelloWorld.mjs
@@ -2,17 +2,18 @@
import WebComponent from "../src/WebComponent.js";
export class HelloWorld extends WebComponent {
- static properties = ["my-name", "emotion"];
+ static properties = ["count", "emotion"];
onInit() {
- let count = 0;
- this.onclick = () => (this.props.myName = `Clicked ${++count}`);
+ this.props.count = 0;
+ this.onclick = () => ++this.props.count;
}
get template() {
- return ``;
+ const label = this.props.count ? `Clicked ${this.props.count}` : "World";
+ const emote = this.props.emotion === "sad" ? ". ðŸ˜" : "! 🙌";
+
+ return ``;
}
}