Simple Tweed Counter
A very simple Tweed app with a stateful component.
HTML
<script src="https://tweedjs.github.io/tweed.js"></script>
<div id="app"></div>
Babel + JSX
const { mutating, Node, render } = Tweed
class Counter {
@mutating count = 0
render () {
return (
<button on-click={() => this.count++}>
Clicked {this.count} times
</button>
)
}
}
render(new Counter(), app)