I\'m using MobX 2.2.2 to try to mutate state inside an async action. I have MobX\'s useStrict set to true.
@action someAsyncFunction(args) {
fetch(`http://loca
To complement the above answer; indeed, action
only works on the function you pass to it. The functions in the then
are run on a separate stack and should therefor be recognizable as separate actions.
Note that you can also give the actions a name as well so that you easily recognize them in the devtools if you use those:
then(action("update objects after fetch", json => this.someStateProperty = json))