Skip to content
Learn Netverks

Lesson

Step 9/36 25% through track

props-down

Props down

Last reviewed May 28, 2026 Content v20260528
Track mode
client_vue
Means
In-browser Vue TS
Reading
~2 min
Level
beginner

This lesson

This lesson teaches Props down: the concepts, APIs, and habits you need before advancing in Vue.

Without Props down, you will struggle to read or extend Vue codebases and playground exercises.

You will apply Props down in contexts like: Greenfield SPAs, dashboards, design systems, and full-stack apps that pair Vue with PHP or Node APIs.

Write TypeScript, click Run—Vue 3 loads from CDN with the template compiler, mountApp shows UI in #app, and printOutput feeds the terminal.

When you can explain the previous lesson's ideas without copying starter code.

Props are read-only inputs passed from parent to child—like arguments to a function. Data flows down the tree; children should not mutate props directly.

Declaring props

props: {
  label: { type: String, required: true },
  tone: { type: String, default: 'info' },
}

In setup(), props arrive as the first argument and stay reactive when the parent updates them.

Props are read-only

If a value must change inside the child, emit an event to the parent (next lesson) or use local state derived from an initial prop. Mutating props.count++ triggers development warnings.

TypeScript note

Real projects type props with defineProps<{ ... }>() in <script setup>. This playground uses runtime prop options—the validation idea is the same.

Important interview questions and answers

  1. Q: Props vs state?
    A: Props come from parent and are read-only in the child; local refs/reactive objects are owned by the component.
  2. Q: Can a child change a prop?
    A: Not directly—request a change via an emitted event or v-model pattern.

Self-check

  1. How is passing props similar to calling a function with arguments?
  2. Why should children not modify props directly?

Pitfall: Mutating a prop in the child breaks one-way data flow—emit an event and let the parent update state.

Interview prep

Why are props read-only in children?

One-way data flow keeps updates predictable—the parent owns state; children request changes via emits instead of mutating props.

Interview tip Lesson completion confidence

Can you explain this lesson in 30 seconds without reading notes?

Not saved yet.

Playground

Runs in your browser in a sandboxed frame. Backend runners appear when this track’s profile allows them.

Check yourself

Multiple choice — immediate feedback.

Discussion

Past discussion is visible to everyone. Only logged-in users can post comments and replies.

Starter discussion topics

  • Prop type you used?
  • One-way data flow?

Sign up or log in to post comments and sync lesson progress across devices.

No discussion yet. Be the first to ask a question.

Jump