Introduction to react

Tharuka Gayashan
2 min readMay 15, 2022


React js Introduction

React is a declarative, efficient, and flexible JavaScript library for building reusable UI components. It is an open-source, component-based front-end library responsible only for the view layer of the application. It was created by Jordan Walke, who was a software engineer at Facebook.

React js Features

Currently, React gaining quick popularity as the best JavaScript framework among web developers. It is playing an essential role in the front-end ecosystem. The important features of react are as following.

  • JSX
  • Components
  • One-way Data Binding
  • Virtual DOM
  • Simplicity
  • Performance
  • Pros and cons of React

Advantage of React

  • Easy to Learn and Use
  • Creating Dynamic Web Applications Becomes Easier
  • Reusable Components
  • Performance Enhancement
  • The Support of Handy Tools
  • Known to be SEO Friendly
  • The Benefit of Having JavaScript Library
  • Scope for Testing the Codes

Disadvantage of React

  • The high pace of development
  • Poor Documentation
  • View Part
  • JSX as a barrier

React States and Props


  • Props are read-only.
  • Props are immutable.
  • Props are used to communicate between components.
  • Props allow you to pass data from one component to other components as an argument.
  • Props make components reusable.
  • Props are external and controlled by whatever renders the component.


  • State changes can be asynchronous.
  • State is mutable.
  • State holds information about the components.
  • State cannot be accessed by child components.
  • States can be used for rendering dynamic changes with the component.
  • The State is internal and controlled by the React Component itself.

Pros and cons

  • Both are plain JS object.
  • Both can contain default values.
  • Both are read-only when they are using by this.