reading-note

https://eng-ehabsaleh.github.io/reading-note/

View on GitHub

React Component

it is a small features which make a peice of the UI

The architecture of Reactjs is component-based. In other words, the UI of a React-based in web application is divided into multiple components. Each component has its own specific logic. The logic is written in JavaScript instead of using templates.

why do we use React

What are the characteristics of a component?

Virtual DOM is one of the chief characteristics that facilitate fast and flexible application development using Reactjs.

JSX stands for JavaScript XML. It is a markup syntax that is very similar to HTML and is used to describe the appearance of an application’s UI.JSX is one of the best features that Reactjs has to offer. It makes the syntax, used by developers to create React components, almost identical to the HTML they will inject in the web page.

One of the major reasons why you should choose Reactjs for your next project is its one-way data flow. Reactjs uses a unidirectional data flow. Meaning, the developers cannot edit any component directly. They have to utilize the callback function in order to make changes in the components.

React Native is a custom renderer for Reactjs. Instead of using web components, React Native uses native components.

In an event of data modification, Reactjs adequately renders and updates just the right components. It generates a simple view for each state of the application. This feature makes the code more readable and simpler to debug.

The architecture of Reactjs is component-based. In other words, the UI of a React-based mobile or web application is divided into multiple components. Each component has its own specific logic. The logic is written in JavaScript instead of using templates. This enables Reactjs developers to pass the data throughout the application without affecting the DOM.

What are the advantages of using component based architecture?

props

“Props” is a special keyword in React, which stands for properties To send props into a component, use the same syntax as HTML attributes

the following picture explain how the data flows between the parent and the child component