Appendix B. Solutions to chapter exercises
- 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.
- 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, ...