title: Error "Vuex do not mutate vuex store state outside mutation handlers" when no mutation outside vuex occurs
body: <p>I have a mutation defined inside Vuex that looks like this:</p>
  <pre><code>setError(state, error) {
      state.error = error
      setTimeout(() =&gt; {
        state.error = null
      }, 5000)
    },
  </code></pre>
  <p>And I call it like this:</p>
  <pre><code>...
  catch (error) {
            this.$store.commit('setError', error.response.data.error.message)
          }
  ...
  </code></pre>
  <p>When the timeout period expires, I get an error: <code>[vuex] do not mutate vuex store state outside mutation handlers.</code> I don't get it, because I'm not mutating anything outside of Vuex.</p>
  <p>Can anyone suggest how to fix this?</p>
  <p>I could fix this by simplifying <code>setError</code> to just assigning the error and dropping the <code>setTimeout</code> part, but I had to do this elsewhere like this:</p>
  <pre><code>flashError(message) {
        this.$store.commit('setError', message)
        setTimeout(() =&gt; {
          this.$store.commit('setError', null)
        }, 5000)
      },
  </code></pre>
  <p>This solution seems suboptimal because I want to be able to set this error temporarily everywhere</p>
  <p>Many thanks</p>