In order to edit an existing note, we could reuse the NoteEditor component. Right now, this component is linked to the currentNote property of the main store, but we could use a property to pass the note to be edited, thereby removing its dependency from the main store. This kind of generalization is common while developing Vuex applications, and often leads to two kinds of components:
- Dumb components: These do not alter or handle application states; they just receive input through properties and dispatch events
- Smart components: These serve as containers for the dumb components; they handle interactions between child components and are dependent on Vuex elements, such as application states and actions
A dumb component ...