Understanding the Basics of React JS

Nitin SharmaNitin Sharma
2 min read

React?

  1. It is a library of JavaScript created by Facebook.

  2. Library is the collection of the predefine code.

  3. it is a tool used to build the UI Component.

History of React:

  1. The first version(V0.3.0) was released in July 2013.

  2. It was created by Facebook Software Engineer, Jordan Walke.

  3. The version of create-react-app is v5.0.1 since Apr 12, 2022.

  4. Current version of react is V18.0.0.

Why or features of react?

  1. Single page application

  2. Component based Architecture

  3. Declarative

Single page application(SPA):

SPA is nothing but whenever we have to navigate from one webpage to another webpage, it is not not going to reload or refresh again and again.

eg: Email, Facebook, Instagram, WhatsApp, Telegram, YouTube etc.

Component Based Architecture:

React follow Component Based Architecture(CBA) for better code maintenance.

Webpage will be divided into small parts and that small parts are knows as component:

  1. Nav.jsx:

    All the code requirement to create a Navbar is written in a component.

  2. Context.jsx:

    All the code requirement to create a context is written this component, like whole body parts, etc.

  3. Footer.jsx:

    All the code required to create a footer is written in this component.

Eg: in the above requirements we are dividing the page into 2 parts which are components

Declarative:

React is known as declarative because of its pre-define codes.

React knowns what to do because it is already written in the form of pre define code

0
Subscribe to my newsletter

Read articles from Nitin Sharma directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Nitin Sharma
Nitin Sharma