wcb/site/src/components/my-counter.js

10 lines
203 B
JavaScript

class Counter extends WebComponent {
static props = {
count: 0,
};
get template() {
return html`<button onClick=${() => ++this.props.count}>
${this.props.count}
</button>`;
}
}