reading_notes

Read: Class 01 - Introduction to React and Components

What is a Component?

  1. object-oriented view (viewed as a set of one or more cooperating classes)
  2. conventional view (viewed as a functional element that integrates the processing logic)
  3. and process-related view.(the system is building from existing components from a library)

Characteristics of Components:

the advantages of using component based architecture:


props stands for:

**properties that used for passing data from one component to another used in React.

How are props used in React?

  1. define an attribute and its value(data) <ChildComponent someAttribute={value} anotherAttribute={value}/>
  2. pass it to child component(s) by using Props. const ChildComponent = (props) => {return <p>I'm the 1st child!</p>};
  3. Render the Props Data. Props returns back an object we access it by dot(.) notation.. const ChildComponent = (props) => {return <p>{props.text}</p>};

The flow of props

Props can only be passed to components in one-way (parent to child)