Chapter 6. Working with components

This chapter covers

  • Understanding parent and child relationships in components
  • Learning about local and global registration
  • Using props and prop validation
  • Adding custom events

In the previous chapters, we learned about conditionals, looping, and lists. Instead of repeating code, we used loops to simplify things. We used conditionals to show different messages depending on the user action. This works, but you may have noticed that our application has grown to more than 300 lines of code. The index.html file we’ve been updating every chapter has computed properties, filters, methods, lifecycle hooks, and data properties in it. With all this information, it’s not easy finding things.

To help solve this, we ...

Get Vue.js in Action now with O’Reilly online learning.

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