Skip to content

Instantly share code, notes, and snippets.

@yelouafi
Last active August 29, 2015 14:26
Show Gist options
  • Save yelouafi/7133f857cb1b40bfcb16 to your computer and use it in GitHub Desktop.
Save yelouafi/7133f857cb1b40bfcb16 to your computer and use it in GitHub Desktop.
function counterItemView(item, handler) {
return h('div.counter-item', {key: item.id }, [
h('button.remove', {
on : { click: e => handler({ type: REMOVE, id: item.id}) }
}, 'Remove'),
counter.view(item.counter, a => handler({type: UPDATE, id: item.id, data: a})),
h('hr')
]);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment