Skip to content

Instantly share code, notes, and snippets.

@anoobbava
Created December 16, 2019 13:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anoobbava/80901284db3ce08573fa617fc1ebae62 to your computer and use it in GitHub Desktop.
Save anoobbava/80901284db3ce08573fa617fc1ebae62 to your computer and use it in GitHub Desktop.
updateTodoMutation (state, todo) {
let index = state.todos.findIndex(element => element.id === todo.id)
state.todos[index] = todo
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment