Unit 1: React Foundations & ComponentsLesson #2 / 5

Lesson 2: Functional Components & Props Passing

Er. Manoj Kumar — AuthorEr. Manoj KumarLast Updated: 26 Aug, 2026

1. Functional Components & Props

Components are pure JavaScript functions that accept an arbitrary input object called props and return JSX describing what should appear on screen.

  • Component Capitalization: Component names MUST start with an uppercase letter (function UserCard() {}).
  • Unidirectional Data Flow: Data flows downwards from parent components to child components via props.
  • Props Destructuring: Extract properties cleanly inside the parameter list (function Card({ title, badge })).
  • Code Example
    // Reusable Child Component with Destructured Props
    function SkillBadge({ name, level, isCertified }) {
    return (
    <div className="skill-pill">
    <span className="skill-name">{name}</span>
    <span className="skill-level">({level})</span>
    {isCertified && <span className="cert-mark">✓ Certified</span>}
    </div>
    );
    }
    // Parent Component passing props
    export default function App() {
    return (
    <div className="app-container">
    <h2>Developer Skill Matrix</h2>
    <SkillBadge name="React 19" level="Advanced" isCertified={true} />
    <SkillBadge name="Next.js" level="Intermediate" isCertified={true} />
    </div>
    );
    }

    Interactive Knowledge Check

    Test your understanding of Lesson #2 concepts

    Are props in React components mutable (editable) by the child component?