Summary
There are so many things that we've done in this chapter. You learned that the Vue CLI is a great tool for scaffolding a project that saves developers a lot of time. You learned the parts of a Vue component, namely, the template block, which is the UI part of the Vue, the script section for writing business logic, and the style block for styling the component. You also learned how to create a Vue component and how to use the common interfaces in Vue, such as v-for
for looping, the v-if
conditions, and the @
sign for writing events.
You were also able to learn how to write states in a Vue component using ref
and how to do data binding using the colon prefix or by using the double curly braces.
Lastly, you learned what props are and how to pass props between two Vue components. You also learned when to use life cycle hooks in a Vue component for triggering a function.
In the next chapter, we will start to develop our real-world enterprise Vue.js app.