ReadingNotes

Introduction to React and Components

Component and React

Component-Based Architecture

Component

A software component is a modular and portable piece of software that encapsulates well-defined functionality and is intended to interact with other components. It has a clearly defined interface and conforms to a recommended behavior. It can be deployed independently and is subject to composition by third parties.

A component can have 3 different views - object-oriented view, conventional view, and process-related view.

Characteristics of Components

Reusability, replaceable, not context specific, extensible, escapsulated, and independent are all characteristics of components

Principles of Component−Based Design

Conducting Component-Level Design

The advantages of using component-based design include ease of deployment, reduced cost, reusability, reliability, and system maintenance and evolution. Component-based design allows for independent development of components and flexible connectivity between them.

Props and how to use it in React

React is a library that follows a component-based approach to UI development, where the UI is divided into reusable components. In some cases, these components need to communicate with each other by passing data. To achieve this, React uses “props” or properties, which are a way to pass data from a parent component to a child component.

Prop is a keyword in react which means properties and is being used for passing data from one component to another. Props flows from top to bottom(Parent to Child).

Questions

Component

  1. A component is a modular and reusable piece of code that encapsulates a set of functionality and renders a part of the UI.
  2. Reusability, replaceable, not context specific, extensible, escapsulated, and independent are all characteristics of components
  3. The advantages of component based architecture are reusability, maintenance, collaboration, and consistency.

Prop Questions

  1. Prop is short of properties
  2. In React, props (short for “properties”) are used to pass data from a parent component to a child component.
  3. parent to child is the flow(top to bottom)

Things i want to know more about