Summary
In this chapter, we saw how components are used to create reusable custom elements. We then registered our first Vue.js components, defining them with template strings.
Next, we looked at component communication with props and custom events. We used this knowledge to build an image carousel within the listing page modal window.
In the second half of the chapter, we got an introduction to single-file components, which we used to refactor Vuebnb into a component-based architecture. We then learned how slots can help us make more versatile components by combining parent and child content.
Finally, we saw how the runtime-only build can be used to give a Vue app a smaller size.
In the next chapter, we will make Vuebnb a multi-page app by building a home page, and using Vue Router to allow navigation between pages without reloading.