My reading journal for Code Fellows.
A component is a software object that is modular, portable, replaceable, reusable, and interacts with other components to provide a certain functionality.
Components are:
Components offer many advantages including reduced cost, ease of development and deployment, reusability, reliability, and independence.
Props is short for properties and is used to pass data between components.
In React, props are used to define an attribute and its corresponding data. The usage is very similar to passing arguments into a function in JavaScript. This allows you to have one component produce different results based on the content you passed it using props.
Props data is read-only and they can only be passed from a parent to a child component. This means the child can’t alter the data passed to it and props do not open some kind of communication channel between components.
I look forward to getting practice using props. The comparison to function parameters/arguments really helped me understand the concept of its use. I feel like once I start using it more, I will really get a good understanding of how it works.