reading-notes

Introduction to React and Components

Why this topic matters

This topic matters because it is laying the foundling of our understanding into React. Components and props are an integral component of React.

Component-Based Architecture

  1. What is a “component”?
    A 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.

  2. What are the characteristics of a component?
    Reusability − Components are usually designed to be reused in different situations in different applications. However, some components may be designed for a specific task.1

    Replaceable − Components may be freely substituted with other similar components.1

    Not context specific − Components are designed to operate in different environments and contexts.1

    Extensible − A component can be extended from existing components to provide new behavior.1

    Encapsulated − A A component depicts the interfaces, which allow the caller to use its functionality, and do not expose details of the internal processes or any internal variables or state.1

    Independent − Components are designed to have minimal dependencies on other components.1

  3. What are the advantages of using component-based architecture?
    Ease of deployment − As new compatible versions become available, it is easier to replace existing versions with no impact on the other components or the system as a whole.1

    Reduced cost − The use of third-party components allows you to spread the cost of development and maintenance.1

    Ease of development − Components implement well-known interfaces to provide defined functionality, allowing development without impacting other parts of the system.1

    Reusable − The use of reusable components means that they can be used to spread the development and maintenance cost across several applications or systems.1

    Modification of technical complexity − A component modifies the complexity through the use of a component container and its services.1

    Reliability − The overall system reliability increases since the reliability of each individual component enhances the reliability of the whole system via reuse.1

    System maintenance and evolution − Easy to change and update the implementation without affecting the rest of the system.1

    Independent − Independency and flexible connectivity of components. Independent development of components by different group in parallel. Productivity for the software development and future software development.1

What is Props and How to Use it in React

  1. What is “props” short for?
    Props is short for properties.
  2. How are props used in React?
    Props are used to pass data from parent to child components.
  3. What is the flow of props?
    The flow is from parent to child component. Props are read-only onces passed into a child component.

References

Things I want to know more about

  1. [https://www.tutorialspoint.com/software_architecture_design/component_based_architecture.htm]  2 3 4 5 6 7 8 9 10 11 12 13 14