Skip to content

Instantly share code, notes, and snippets.

@bertoni
Created June 29, 2018 14:11
Show Gist options
  • Save bertoni/d3f5dea075f85e477cf90622fcc617ff to your computer and use it in GitHub Desktop.
Save bertoni/d3f5dea075f85e477cf90622fcc617ff to your computer and use it in GitHub Desktop.
Forte acoplamento vue
<template>...</template>
<script>
export default {
name: 'SomeComponent',
methods: {
remove () {
this.$store.dispatch('removeSomething', this.id)
.then(() => {
/* Some implementation for success case */
})
.catch(error => {
/* Some implementation for fail case */
})
},
}
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment