There are a few common operations that are performed on lists: add a new item, search through the list, and deleting an item from a list. The snippet below shows how to delete an item from a list.
list is an array of names. In the , we render the list using v-for. For each list item, we display the name along with a button. Each button has a click listener which triggers the method deleteFromList(). The method receives the index of the item and deletes the item from the list using Array.splice().
#vue #vue.js