Created
May 30, 2019 21:38
-
-
Save nanotroy/b9bbe5d7aff6e4f1c5725d100927294f 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
const submit = (store: TodoStore) => | |
h('button', { | |
props: { className: 'add-todo-submit' }, | |
events: { | |
click: (e) => { | |
e.preventDefault() | |
store.addTodo(store.input.get()) | |
store.input.set('') | |
} | |
}, | |
children: [ | |
text('Add') | |
] | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment