-
A component is a software object with a defined functionality that is able to interact with with other components.
-
Characteristics of components
-
Reusable: can be used in different situations and applications
-
Replaceable: can be swapped out for similar components
-
Not context specific: can be used in multiple environments
-
Extensible: can be extended from other components to produce new behavior
-
Encapsulated: can be used without revealing internal processes or variables
-
Independent: do not depend on other components
-
-
The advantages of component-based architecture include ease of development, deployment, maintenance, and evolution as well as increased reliability.
-
Props is short for properties and is used to pass read-only data from parent components to child components.
-
Props are used in a 3 step process.
-
Firstly, define an attribute and its value(data)
-
Then pass it to child component(s) by using Props
-
Finally, render the Props Data
-
-
Props flow from parent to child.