In Chapter 2, Displaying, Looping, Searching, and Filtering Data, we got our Vue app displaying our people directory, we can use this opportunity to optimize our code and separate it out into components. This makes the code more manageable, easier to understand, and makes it easier for other developers to work out the flow of data (or you, when you come back and look at your code in a few months!).
This chapter is going to cover:
- Optimizing our Vue.js code by reducing the repetition, and logically organizing our code
- How to create Vue components and use them with Vue
- How to use props and slots with components
- Utilizing events to transfer data between components