301 class 01 notes
Why this matters: This information matters because components and properties are key tools for using React.
Component-Based Architecture
Source: https://www.tutorialspoint.com/software_architecture_design/component_based_architecture.htm
1. What is a “component”?
- Modular, portable, replaceable and reusable set of well-defined functionality that encapsulates the implementation and exporting it as a higher-level interface.
- Software object intended to interact with other components, encapsulating certain functionality or a set of functionalities.
- It has an obviously defined interface and conforms to a recommended behavior common to all components within an architecture.
- A unit of composition with a contractually specified interface and explicit context dependencies only.
2. What are the characteristics of a component?
- Reusability
- replaceable
- Not content specific
- Extensible
- Encapsulated
- Independent
3. What are the advantages of using component-based architecture?
What Is Props And How To Use In React
Source: https://itnext.io/what-is-props-and-how-to-use-it-in-react-da307f500da0#:~:text=%E2%80%9CProps%E2%80%9D%20is%20a%20special%20keyword,way%20from%20parent%20to%20child
1. What is “props” short for?
2. How are props used in React?
- Define an attribute and it’s value (data)
- Pass it to child component(s) using Props
- Render the Props data
3. What is the flow of props?
- Unidirectional flow - one way from parent to child; also immutable (read-only)
Things I Want To Know More About:
Nothing at the moment!