Navigation Component
In this lesson, we extract the links in App.vue to their own dedicated and semantically name component file. We also follow the Vue.js styleguide, calling it TheNavigation since it's a component that's only meant to be used throughout the application.
Links
LESSON TRANSCRIPT
Let's make our navigation a little more organized by extracting it into its own component. Component names should be multi-worded, not to conflict with any existing or future HTML elements, which are all single worded. For single instance components, it's also strongly recommended, according to the official style guide, to name these components using the. For example, the navigation.
view. And then move all of our destination links into it. vue and add it to our template. Let's check to see if everything is still working.
And it is. Perfect.
This transcript is generated automatically from the lesson video. Spotted an inaccuracy? Let us know at team@vueschool.io.
