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