terriajs
terriajs copied to clipboard
Update model layer docs with more strict rules around `mobx.action` and async/Promise functions
Wrapping an async function with mobx.action
can hide mobx reactivity bugs. mobx.action
(and flow
, runInAction
, untracked
, etc.) should be used conservatively in places where a user causes a state mutation, or when an async request (started by a user) finishes and state must be mutated.
See #5026 and #5032 for an example of this type of problem.
ticket is for updating docs for contributors