Warning not to invoke background m.request as m.prop in modules
This commit is contained in:
parent
320466edeb
commit
44f6a9a64d
4 changed files with 3212 additions and 10 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue