tweaks to docs

This commit is contained in:
Leo Horie 2016-12-07 10:09:49 -05:00
parent f1f52445ec
commit ae916664de
3 changed files with 3 additions and 3 deletions

View file

@ -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).

View file

@ -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

View file

@ -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 = {