Props
Pass “orders” to a component to change how it looks and behaves
Key points
- Props are the "order" you pass to a component. You write them just like HTML attributes
- The receiving component gets them as function arguments: function Greeting({ name }) { ... }
- Don't change props you receive. If something needs to change, the parent that passes them changes it
Try it
- Add a third Greeting
- Also pass age to Greeting and show "Age: N" (hint: { name, age })
- See what happens if you forget to pass name