Created
July 11, 2019 21:20
-
-
Save iazel/9bb64ac67e8c93b54f183b22ba4bc205 to your computer and use it in GitHub Desktop.
Composable Reactive UI / Submit with Store
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', sc([ | |
ctext('Add') | |
props({ className: 'add-todo-submit' }), | |
onClick((e) => { | |
e.preventDefault() | |
store.addTodo(todo.get()) | |
store.getInput().set('') | |
}), | |
])) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment