component
is a modular, portable, replaceable, and reusable set of well-defined functionality that encapsulates its implementation and exporting it as a higher-level interface.
- The primary objective of component-based architecture is to ensure component reusability
-
standard component frameworks such as : COM/DCOM, JavaBean, EJB, CORBA, .NET, web services, and grid services
- Component-oriented software design advantages:
- Reduced time in market and the development cost by reusing existing components.
- Increased reliability with the reuse of the existing components
-
A software component can be defined as a unit of composition with a contractually specified interface and explicit context dependencies only
- component can have three different views:
− object-oriented view
- conventional view
- process-related view.
- Characteristics of Components :
- Reusability
- Replaceable
- Not context specific
- Extensible
- Encapsulated
- Independent
- the advantages of using component based architecture :
- Ease of deployment
- Reduced cost
- Ease of development
- Reusable
- Modification of technical complexity
- Reliability
- System maintenance and evolution
- Independent
Props
is a special keyword in React, which stands for properties and is being used for passing data from one component to another.
-
But the important part here is that data with props are being passed in a uni-directional flow. (one way from parent to child)
-
props data is read-only
how to use Props :
1- define an attribute and its value(data) 2- Then pass it to child component(s) by using Props 3- render the Props Data
What is the flow of props?
we pass props into a React component and props bring all the necessary data.