Things I want to know more about

This is my reading notes for Code Fellows.

Things I want to know more about

What is a Component?

A component is a modular, portable, replaceable, and reusable set of well-defined functionality that encapsulates its implementation and exporting it as a higher-level interface.A component is a software object, intended to interact with other components, encapsulating certain functionality or a set of functionalities.

Characteristics of Components

Reusability − Components are usually designed to be reused in different situations in different applications. However, some components may be designed for a specific task.

Replaceable − Components may be freely substituted with other similar components.

Not context specific − Components are designed to operate in different environments and contexts.

Extensible − A component can be extended from existing components to provide new behavior.

Encapsulated − A A component depicts the interfaces, which allow the caller to use its functionality, and do not expose details of the internal processes or any internal variables or state.

Independent − Components are designed to have minimal dependencies on other components.

Advantages

-Ease of deployment

-Reduced cost

-Ease of development

-Reusable

What is Props?

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

Using Props in React.

Firstly, define an attribute and its value(data)

Then pass it to child component(s) by using Props

Finally, render the Props Data

What is the flow of props?

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

Home