title: How to update object in vuex store array?
body: <p>I'm pretty new to vue/vuex/vuetify but starting to get the hang of it.
  I have a problem though I haven't been able to solve properly.</p>
  
  <p>I have an array of "projects" in my store. When deleting and adding items to the store via mutations the changes reflect properly in subcomponents referencing the array as a property.</p>
  
  <p>However, changes to items in the array does not reflect even though I can see that the array in the store is updated.</p>
  
  <p>The only way I got it to "work" with an update action was to either :</p>
  
  <ol>
  <li>remove the project from the array in the store and then add it </li>
  <li><p>use code that sort of does exactly the same as described above but like so:</p>
  
  <pre><code>state.categories = [
  ...state.categories.filter(element =&gt; element.id !== id),
  category
  ]
  </code></pre></li>
  </ol>
  
  <p>But the problem with the above two methods is that the order of the array gets changed and I would really like to avoid that..</p>
  
  <p>So basically, how would I rewrite my mutation method below to make the state reflect to subcomponents and keep the order of the array?</p>
  
  <pre><code> updateProject(state, project) {
  
          var index = state.projects.findIndex(function (item, i) {
              return item.id === project.id;
          });
  
          state.projects[index] = project;
      }
  </code></pre>