From ae916664de9356d6d1a3e55791d2ddb93a786cc6 Mon Sep 17 00:00:00 2001 From: Leo Horie Date: Wed, 7 Dec 2016 10:09:49 -0500 Subject: [PATCH] tweaks to docs --- docs/request.md | 2 +- docs/route.md | 2 +- docs/withAttr.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/request.md b/docs/request.md index cd204844..75be0de9 100644 --- a/docs/request.md +++ b/docs/request.md @@ -76,7 +76,7 @@ m.request({ }) ``` -Calls to `m.request` return a [promise](promise.md). +A call to `m.request` return a [promise](promise.md) and trigger a redraw upon completion of its promise chain. By default, `m.request` assumes the response is in JSON format and parses it into a Javascript object (or array). diff --git a/docs/route.md b/docs/route.md index e98a8070..f493276b 100644 --- a/docs/route.md +++ b/docs/route.md @@ -122,7 +122,7 @@ Argument | Type | Description If `onmatch` returns a component or a promise that resolves to a component, this component is used as the `vnode.tag` for the first argument in the RouteResolver's `render` method. Otherwise, `vnode.tag` is set to `"div"`. Similarly, if the `onmatch` method is omitted, `vnode.tag` is also `"div"`. -If `onmatch` returns a promise that gets rejected, the router redirects back to `defaultRoute`. +If `onmatch` returns a promise that gets rejected, the router redirects back to `defaultRoute`. You may override this behavior by calling `.catch` on the promise chain before returning it. ##### routeResolver.render diff --git a/docs/withAttr.md b/docs/withAttr.md index 10638e51..ac000a22 100644 --- a/docs/withAttr.md +++ b/docs/withAttr.md @@ -15,7 +15,7 @@ Returns an event handler that runs `callback` with the value of the specified DO ```javascript var state = { value: "", - setValue: function(v) {value = v} + setValue: function(v) {state.value = v} } var Component = {