const {t} = ef

const App = t`
>input
	#disabled
	%value = {{inputValue = 0}}
>button
	@click = decrement
	.-
>button
	@click = increment
	.+
`

let count = 0
const app = new App({
	$methods: {
		decrement({state}) {
			count -= 1;
			state.$data.inputValue = count
		},
		increment({state}) {
			count += 1;
			state.$data.inputValue = count
		}
	}
})

app.$mount({target: document.body})

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. https://unpkg.com/ef.js