title: Using the MobX @action decorator with async functions and .then
body: <p>I'm using MobX 2.2.2 to try to mutate state inside an async action. I have MobX's useStrict set to true.</p>
  
  <pre><code>@action someAsyncFunction(args) {
    fetch(`http://localhost:8080/some_url`, {
      method: 'POST',
      body: {
        args
      }
    })
    .then(res =&gt; res.json())
    .then(json =&gt; this.someStateProperty = json)
    .catch(error =&gt; {
      throw new Error(error)
    });
  }
  </code></pre>
  
  <p>I get:</p>
  
  <pre><code>Error: Error: [mobx] Invariant failed: It is not allowed to create or change state outside an `action` when MobX is in strict mode. Wrap the current method in `action` if this state change is intended
  </code></pre>
  
  <p>Do I need to supply the @action decorator to the second .then statement? Any help would be appreciated.</p>