diff --git a/README.md b/README.md index f235dea..cbf5ca2 100644 --- a/README.md +++ b/README.md @@ -419,7 +419,7 @@ const app = choo() function view (params, state, send) { return choo.view` -
+
@@ -428,13 +428,14 @@ function view (params, state, send) {
- +
` - function onClick () { - const data = getFormData(document.querySelector('#login-form')) + function onSubmit (e) { + const data = getFormData(e.target) send('post', { payload: data }) + e.preventDefault() } }