Deleting existing notes

The next feature I am going to implement is the ability to delete notes. The following is the updated To-do list:

To-do:Delete a note*- delete action- delete mutation- create Note component and use it in NoteList componentUpdate an existing noteSave notes to LocalStorageExtra:Search among notesPin a noteDone:Show all notesCreate new notes

In order to let users delete notes, I need to update the note frame to have a delete button, add a deleteNote action, and add a DELETE_NOTE mutation. Finally, I will extract the note frame code from NoteList and create a Note component. Let's create the DELETE_NOTE mutation.

Test code:

// test/store/mutations.spec.jsimport { mutations, types } from '../../src/store/mutations';describe ...

Get Vuex Quick Start Guide now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.