0% found this document useful (0 votes)
0 views

Introduction to React2

React is a JavaScript library developed by Facebook in 2013, widely used for building user interfaces with a component-based architecture and Virtual DOM for efficient rendering. It offers benefits like speed, reusability, and ease of maintenance, making it a popular choice among developers. To get started with React, one should familiarize themselves with JavaScript fundamentals and utilize tools like Create React App for quick setup.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views

Introduction to React2

React is a JavaScript library developed by Facebook in 2013, widely used for building user interfaces with a component-based architecture and Virtual DOM for efficient rendering. It offers benefits like speed, reusability, and ease of maintenance, making it a popular choice among developers. To get started with React, one should familiarize themselves with JavaScript fundamentals and utilize tools like Create React App for quick setup.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 7

Introduction to React

React, a JavaScript library created by Facebook in 2013, has


transformed web development. It's used by over 40% of web
developers globally to build user interfaces. Top applications
like Netflix and Amazon rely on React's powerful features.

AA
By: Parth Lande [36]
What is React?

React employs a declarative approach to UI development. Its


component-based architecture promotes reusable code.
React utilizes a Virtual DOM for optimal rendering. Together,
these features create scalable web applications.

Why Use ReactJS?

•Fast: Uses a smart system called Virtual DOM to update


the screen quickly.
•Reusable: Breaks the UI into small parts called
components.
•Easy to maintain: Code is more organized and modular.
•Big Community: Lots of tutorials and help online.
React Components
Components are the building blocks of any React app.
They are independent and reusable pieces of code.
•Think of it like a LEGO block—you build your site by putting these blocks
together.
•Each component handles a small part of the UI (like a button, form, or navbar).
•Components can be reused anywhere in your site.

Two Types of Components


1.Functional Component
1. Simple function
2. Modern and preferred
3. Uses Hooks for logic
2.Class Component
1. Uses JS classes
2. Older style, Still works, but less common now
Satate and Props
What are Props?
Props (short for Properties) are like arguments you pass to a
component.
They let you send data from one component to another (usually parent
to child).

What is State?
State is data that belongs to a component and can change over time.
You use state when the component needs to react to user actions, like
button clicks, typing, etc.
Performance and Optimization

Virtual DOM reduces unnecessary rendering. Memoization


techniques are employed.

The Virtual DOM in React is a lightweight JavaScript version of the real


browser DOM.
React uses it to track changes in the UI and update only the parts that need
to change — not the whole page.
Getting Started with React
Create React App for quick setup. Learn JavaScript
fundamentals first. Practice building small components
regularly. Explore official React documentation. Join
developer communities for support.
Create React App (CRA)

📦 Commands:

-npx create-react-app my-app


-cd my-app
-npm start
Make sure you have node and npm
Thank you

You might also like