Skip to content
Learn Netverks

Lesson

Step 7/36 19% through track

elements-props

Elements and props

Last reviewed May 28, 2026 Content v20260528
Track mode
client_react
Means
In-browser React TSX
Reading
~1 min
Level
beginner

This lesson

This lesson teaches Elements and props: the concepts, APIs, and habits you need before advancing in React.

Without Elements and props, you will struggle to read or extend React codebases and playground exercises.

You will apply Elements and props in contexts like: SPAs, dashboards, design-system-driven products, and React Native mobile apps.

Write TypeScript/TSX, click Run in browser—React 18 loads from CDN, JSX compiles in the tab, UI renders in the preview root, and printOutput feeds the terminal.

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

A React element is a lightweight description of UI—a plain object React understands. Props (properties) are read-only inputs you pass into components, like function arguments.

Passing props

function Greeting({ name }: { name: string }) {
  return <p>Hello, {name}</p>;
}

<Greeting name="Ada" />

Props are read-only

Never mutate props inside a component. If something must change, it belongs in state (covered in the next module) or the parent passes new props.

Spreading props

You can forward props with spread: <input {...fieldProps} />. Use sparingly—explicit props are easier to trace.

Important interview questions and answers

  1. Q: Element vs component?
    A: An element is what you create with JSX; a component is a function or class that returns elements.
  2. Q: Can you change props inside a child?
    A: No—props flow down and are immutable from the child’s perspective.

Self-check

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

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 you passed today?
  • Read-only props—why?

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