Last active
August 29, 2015 14:25
-
-
Save yelouafi/8d22c462de2e547cc940 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function view(model, handler) { | |
return h('div', [ | |
h('button', { | |
on : { click: handler.bind(null, {type: ADD}) } | |
}, 'Add'), | |
h('button', { | |
on : { click: handler.bind(null, {type: RESET}) } | |
}, 'Reset'), | |
h('hr'), | |
h('div.counter-list', model.counters.map(item => counterItemView(item, handler))) | |
]); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment