Module 6 of 10

Components & Props

Lessons

About This Module

Real Vue apps are not one big template. They are built from components: small, reusable pieces such as a header, a list item, or a form, each with its own template, logic, and styles. In Vue, a component usually lives in its own .vue single-file component.

Once an interface is split up, the pieces need to share data. You will learn how a parent passes data down to a child with props, how a child talks back with the custom events from the previous module, and how to design components so they can be reused in many places.

Watch the lessons in order, then continue on to Computed, Watchers & Lifecycle.

Lessons

6 videos
01

Header Component

Brad Traversy creates his first component, a header, and uses it inside the main app.

02

Component Props

Making a component configurable by passing data into it from its parent with props.

03

Single Task Component

Pulling one item of a list out into its own component, so each task is rendered by a reusable piece.

04

The Vue CLI & Bigger Projects (Part 1)

The Net Ninja starts building larger Vue projects with the Vue CLI, where each component lives in its own file.

05

The Vue CLI & Bigger Projects (Part 2)

The Net Ninja goes deeper into larger projects, including how to pass data (props) between components.

06

Reusable Components

The "Reusable Components" section of freeCodeCamp's Vue 3 course: designing components so they can be used in many places.