Warning not to invoke background m.request as m.prop in modules

This commit is contained in:
Barney 2014-11-07 10:23:23 +00:00
parent 320466edeb
commit 44f6a9a64d
4 changed files with 3212 additions and 10 deletions

View file

@ -457,6 +457,8 @@ where:
m.request({method: "GET", url: "/foo", background: true})
.then(m.redraw); //force redraw
```
The return value of a background `m.request` should not be exposed to controllers or views, since without the blocking effect of redraw-blocking effect of `m.startComputation` it is liable to be invoked before it resolves, which can lead to runtime errors.
- **any unwrapSuccess(any data)** (optional)