Skip to content

Instantly share code, notes, and snippets.

@nanotroy
Created May 30, 2019 21:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nanotroy/b9bbe5d7aff6e4f1c5725d100927294f to your computer and use it in GitHub Desktop.
Save nanotroy/b9bbe5d7aff6e4f1c5725d100927294f to your computer and use it in GitHub Desktop.
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