Appendix B. Solutions to chapter exercises

Solutions to the exercise questions in chapters 212 are listed here.

Chapter 2

  • In section 2.4 we created a filter for the price. Can you think of any other filters that might be helpful?

Filters in Vue.js are commonly used to do text filtering. One filter you may want to add is a way to capitalize the product title.

Chapter 3

  • Earlier in the chapter we looked at computed properties and methods. What are the differences?

Computed properties are useful when you’re trying to derive a value. The value will be automatically updated whenever any of its underlying values are updated. It’s also cached to avoid repetitively calculating a value that doesn’t need to be recalculated when it hasn’t changed, ...

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

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.