What Are Props?
Props, short for properties, are values passed from a parent component to a child component.
Props make components reusable because the component does not need to hard-code every value it displays.
How Props Flow
React normally follows a one-way data flow: the parent owns or receives data and passes the required values down to child components.
Important Rule
Props should be treated as read-only by the receiving component. If a child needs to request a change, the parent can pass a callback function.
Common Uses
- Pass text and numbers.
- Pass objects and arrays.
- Pass callback functions.
- Configure reusable components.
- Pass React elements as children.