Skip to main content

Props: Passing Data Down

Learn Props: Passing Data Down (Phase 3 · Props and Component Composition (Essential), ReactJS) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.

Props are the inputs of a component • Props are passed like HTML attributes and received as one object, usually destructured in the parameter list. • Props flow one way: parent to child , and are read-only . A child that needs to change something calls a function the parent passed down. • You can pass any value: strings, numbers, booleans ( disabled alone means true ), objects, arrays, functions and even JSX. Non-string values need braces.

More lessons in Phase 3 · Props and Component Composition (Essential)