blob: 0c40f7add7bb612c875239f6da03682119466e84 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
import ReactiveVar, text, elements from require 'mmm.component'
import div, button from elements
count = ReactiveVar 0
div {
button '-', onclick: () -> count\transform (c) -> c - 1
" count is: "
count\map text
" "
button '+', onclick: () -> count\transform (c) -> c + 1
}
|