reading-notes

this repo will contain my reading during the course .

View on GitHub

Introduction to React and Components

REACT

Component-Based Architecture

component

What is React?

Agnostic User Interface Library that means that we use it for creating user interfaces websites applications anything that the user is going to see in the browser and other places that react could go that is what it is primarily used to help with and the react has a component.

What is a component?

A small piece of code that fills a certain part of the user interface that you are building with react.

What is the dataflow of React?

React has a one-way data flow which is becoming the standard today in JavaScript applications but it was one of the first to introduce it this is very different from two way binding which you maybe familiar with in JavaScript.

What is a Component?

A component is a 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.

What are the charactistics of a component?

What are the advantages of using component based architecture?

What is Props and How to Use it in React

React has a different approach to data flow & manipulation than other frameworks, and that’s why it can be difficult at the beginning to understand some concepts like props, state and so on.

PROPS

What is props short for?

“Props” is a special keyword in React, which stands for properties and is being used for passing data from one component to another.

How are props used in React?

  1. Firstly, define an attribute and its value(data)
  2. Then pass it to child component(s) by using Props
  3. Finally, render the Props Data

What is the flow of props?

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

DATAFLOW

Conclusion

Sources: