Overview
- Props (properties) let a parent component send data to its children. // App.js <Greeting name="TechPrep" />
Greeting
receives the prop (via parameter destructuring) and injects it into the markup:function Greeting({ name }) { return <h1>Hello, {name}!</h1>; }
import Greeting from "./Greeting"; export default function App() { return ( <div className="App p-3"> <Greeting /> </div> ); }
JavaScript Console
console.log()statements will appear here
Tests