Skip to content

Latest commit

 

History

History
50 lines (31 loc) · 2.76 KB

301-class-01.md

File metadata and controls

50 lines (31 loc) · 2.76 KB

Notes on Introduction to React and Components

Component-Based Architecture

  • What is a “component”?

A component is an object that has a "functionality or a set of functionalities", an interface that has been overtly specified, and conformity to common recommended behavior for architecture components. It is meant for interaction with other components, which is key to its functionality.

  • What are the characteristics of a component?

A mneumonic acronym for the characteristics of a component could be REINER which stands for:

  • Reusable - while some components can be intended for unique tasks, often components are meant to be used again and again in a variety of different contexts and apps.

  • Extensible - components can be extended from previously created components to allow for new behavior.

  • Independent - component design ensures it has little dependency on other components.

  • Not context specific - components can operate in various situations and environments.

  • Encapsulated - Interfaces are depicted by the component, so the caller of the component can use its functionality without exposing internal process details, internal variables, or state.

  • Replaceable - A component can be substituted by other like components.

  • What are the advantages of using component-based architecture?

Another mneumonic acronym, I MRS REER, which stands for:

  • Independent - (explained above).
  • Modification of technical complexity - complexity is modified through use of components container and services.
  • Reduced cost - cost of maintenance and development is spread through use of third-party components.
  • System maintenance and evolution - implementation can be easily changed and updated without the other aspects of the system being affected.
  • Reusable - (explained above).
  • Ease of deployment - new, compatible versions can more easily replace existing versions without impacting other system components (or the system holistically).
  • Ease of development - new functionality can be defined through implementation of well-known interfaces by components, without the rest of the system being impacted by this development.
  • Reliability - as each individual component is more reliable, the system as a whole becomes that much more reliable as well.

What is Props and How to Use it in React

  • What is “props” short for?

It is short for "properties".

  • How are props used in React?

props are used to pass data from one component to another.

  • What is the flow of props?

From parent to child, one-way (otherwise known as uni-directional flow).

Things I want to know more about

Really I'm just excited to see in greater details what these components look like in action, and I'm looking forward to working with / using them.