reading-notes

Introduction to React and Components

Why is this Important?

  1. Components are important because they give sections of code specific roles and provide ease of use/reusability.

  2. Prop advantages are that they allow for transfer of datas more efficiently between a parent and child element.

Component-Based Architecture

  1. A component is a piece of software that has a certain set of functionalities and has a defined interface.

  2. Some characteristics of components are: “modular, portable, replaceable, independent and reusable” source. They also have defined functionalities and interact with other components.

  3. Some advantages of using component-based architecture are that it increases reusability, reliability, reduced cost, ease of deployment/development: “it is easier to replace existing versions with no impact on the other components or the system as a whole” source.

What is Props and How to Use it in React

  1. “Props” is short for properties

  2. “Props are passed from one component to another like function arguments.” Props data is immutable. source.

  3. They can only be passed to components uni-directionally (Parent to child).

Questions I have

  1. In a lot of the react stuff it seems like there are both HTML and JavaScript style code imbedded within eachother, is react done in the markup?

In Class Lecture