SlideShare a Scribd company logo
2
Most read
3
Most read
7
Most read
An Introduction to
ReactJS
What is React?
- React is a Javascript framework that focuses on declarative syntax
and virtualization of DOM.
- It is an open-source Javascript library, Developed by Meta in 2013.
- It provides a declarative and efficient way to create interactive UI
components.
- It allows building more reusable and maintainable UI components
with ease.
Why React?
Virtual DOM
- A Virtual DOM is a lightweight copy of the real DOM.
- Traditionally, only way to change content dynamically on
web was to manipulate the real DOM.
- React's virtual DOM allows for efficient updates and
selective rendering, resulting in faster and smoother
user experiences.
Why React?
- Component-based Architecture
- ReactJS follows a component-based architecture, where UIs are divided into
reusable components.
- Traditional web development often involves a mix of HTML, CSS, and
JavaScript, leading to tightly coupled code.
- React's component-based approach promotes modularity, reusability, and
easier maintenance of code.
Why React?
- Unidirectional Data Flow
- ReactJS enforces a unidirectional data flow, also known
as one-way binding.
- Traditional web development often involves two-way data binding,
where changes in one part of the application affect others,
making it harder to track and manage data changes.
- React's unidirectional data flow simplifies data management,
reducing the likelihood of bugs and making the application
easier to reason about.
Why React?
- State Management
- State management is a critical aspect of building complex
web applications.
- ReactJS provides several options for managing state
Efficiently within its ecosystem.
- Various ways of State Management:
- Local Component State
- useState
- Context API
- Redux
What is a React Component?
- ReactJS follows a component-based architecture, where UIs
are composed of reusable building blocks called components.
- A React component is a JavaScript function or class that
returns a JSX (JavaScript XML) representation of the UI.
- It encapsulates the UI logic and state, making it
reusable and modular.
- React supports two ways of declaring a component-
- Class Components
- Functional Components
Structure of React Component
- Props
- Props allow passing data from parent components to child components.
- Props are read-only and should not be modified within the component.
- State
- State represents the mutable data within a component.
- State is typically managed within class components using the this.state object and the
setState method.
- Functional components can also have state using React hooks like useState.
- Styling
- Styling can be applied to React components using CSS classes, inline styles, or CSS-in-JS
libraries.
- CSS classes can be added using the className attribute in JSX.
- Inline styles can be applied using the style attribute in JSX.
What is JSX?
- JSX (JavaScript XML) is a syntax extension for
JavaScript used in React.
- JSX allows you to write HTML-like code within JavaScript,
making it easier to create and manipulate the UI.
- JSX allows embedding JavaScript expressions within
curly braces {}.
- JSX needs to be compiled into plain JavaScript to be
understood by the browser.
Component Life Cycle
- React components have a life cycle consisting of different phases and methods that are
executed at specific times.
- The mounting phase is when a new component is
created and inserted into the DOM.
- The updating phase is when the component updates
or re-renders. This reaction is triggered when the
props are updated or when the state is updated.
- The last phase within a component's lifecycle is the
unmounting phase, when the component is removed
from the DOM.
Life Cycle Hooks
- componentDidMount()
- This hook is called after a component is mounted (rendered for the first time) in the DOM.
- componentDidUpdate(prevProps, prevState)
- This hook is called after a component is updated and re-rendered in response to changes in
props or state.
- componentWillUnmount()
- This hook is called just before a component is unmounted and removed from the DOM.
- shouldComponentUpdate(nextProps, nextState)
- This hook is called before a component is re-rendered and allows you to control if the re-
rendering should occur.
Running a React Application
- To run a React Application, we need to install
- NodeJS
- Node Package Manager (NPM)
- Install create-react-app
- npm install -g create-react-app
- Create React Application
- npx create-react-app my-app
- Run development server
- cd my-app
- npm start
- Build Project
- npm run build
Conclusion
- React is a powerful JavaScript library for building user interfaces.
- React's component-based architecture and efficient rendering make it a
popular choice for front-end development.
THANK YOU

More Related Content

PPTX
ReactJS presentation.pptx
DivyanshGupta922023
 
PPTX
Reactjs
Neha Sharma
 
PPTX
React JS - A quick introduction tutorial
Mohammed Fazuluddin
 
PPTX
React workshop
Imran Sayed
 
PPTX
Introduction to MERN Stack
Surya937648
 
PPTX
Basic Photoshop Tutorial
Marc Dy
 
PPTX
Introduction to React JS
Arnold Asllani
 
PPTX
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
Karmanjay Verma
 
ReactJS presentation.pptx
DivyanshGupta922023
 
Reactjs
Neha Sharma
 
React JS - A quick introduction tutorial
Mohammed Fazuluddin
 
React workshop
Imran Sayed
 
Introduction to MERN Stack
Surya937648
 
Basic Photoshop Tutorial
Marc Dy
 
Introduction to React JS
Arnold Asllani
 
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
Karmanjay Verma
 

What's hot (20)

PDF
JavaScript - Chapter 15 - Debugging Techniques
WebStackAcademy
 
PDF
The New JavaScript: ES6
Rob Eisenberg
 
PPT
Introduction to Javascript
Amit Tyagi
 
PPT
JavaScript & Dom Manipulation
Mohammed Arif
 
PDF
An introduction to React.js
Emanuele DelBono
 
PDF
ReactJS presentation
Thanh Tuong
 
PDF
Angular - Chapter 7 - HTTP Services
WebStackAcademy
 
PDF
React JS - Introduction
Sergey Romaneko
 
PDF
Basics of JavaScript
Bala Narayanan
 
PPTX
[Final] ReactJS presentation
洪 鹏发
 
PPTX
React js
Oswald Campesato
 
PPTX
Introduction to React JS for beginners
Varun Raj
 
PPTX
Intro to React
Justin Reock
 
PPTX
Angular overview
Thanvilahari
 
PPSX
Javascript variables and datatypes
Varun C M
 
PDF
JavaScript - Chapter 8 - Objects
WebStackAcademy
 
PPTX
Introduction to angular with a simple but complete project
Jadson Santos
 
PPTX
JavaScript
Vidyut Singhania
 
PPTX
React-JS.pptx
AnmolPandita7
 
PDF
jQuery for beginners
Arulmurugan Rajaraman
 
JavaScript - Chapter 15 - Debugging Techniques
WebStackAcademy
 
The New JavaScript: ES6
Rob Eisenberg
 
Introduction to Javascript
Amit Tyagi
 
JavaScript & Dom Manipulation
Mohammed Arif
 
An introduction to React.js
Emanuele DelBono
 
ReactJS presentation
Thanh Tuong
 
Angular - Chapter 7 - HTTP Services
WebStackAcademy
 
React JS - Introduction
Sergey Romaneko
 
Basics of JavaScript
Bala Narayanan
 
[Final] ReactJS presentation
洪 鹏发
 
Introduction to React JS for beginners
Varun Raj
 
Intro to React
Justin Reock
 
Angular overview
Thanvilahari
 
Javascript variables and datatypes
Varun C M
 
JavaScript - Chapter 8 - Objects
WebStackAcademy
 
Introduction to angular with a simple but complete project
Jadson Santos
 
JavaScript
Vidyut Singhania
 
React-JS.pptx
AnmolPandita7
 
jQuery for beginners
Arulmurugan Rajaraman
 
Ad

Similar to Presentation on "An Introduction to ReactJS" (20)

PPTX
unit 2 React js.pptxdgdgdgdgdgdgdgdgdsgdgdg
zmulani8
 
PPTX
Getting started with react & redux
Girish Talekar
 
PDF
100 React Interview questions 2024.pptx.pdf
codevincent624
 
PPTX
reactJS
Syam Santhosh
 
PPTX
Introduction to React JS.pptx
SHAIKIRFAN715544
 
PPTX
Introduction to ReactJS UI Web Dev .pptx
SHAIKIRFAN715544
 
PDF
Fundamental concepts of react js
StephieJohn
 
PPTX
React JS Interview Question & Answer
Mildain Solutions
 
PPTX
BackboneJS + ReactJS
Skanda Shastry
 
PDF
Materi Modern React Redux Power Point.pdf
exiabreak
 
PPTX
downloads_introduction to redux.pptx
NavneetKumar111924
 
PPTX
Presentation1
Kshitiz Rimal
 
PPTX
ReactJs
Sahana Banerjee
 
PPTX
Reactjs
Mallikarjuna G D
 
PPTX
Comparing Angular and React JS for SPAs
Jennifer Estrada
 
PPTX
React JS: A Secret Preview
valuebound
 
PDF
A React Journey
LinkMe Srl
 
PDF
unit 3_Adv WTAdvanced Web Tecg Design_HTML_CSS_JAVASCRIPT_AJAX_PPT.pdf
GauravDwivedi695361
 
PPTX
Reactjs notes.pptx for web development- tutorial and theory
jobinThomas54
 
PDF
REACTJS.pdf
ArthyR3
 
unit 2 React js.pptxdgdgdgdgdgdgdgdgdsgdgdg
zmulani8
 
Getting started with react & redux
Girish Talekar
 
100 React Interview questions 2024.pptx.pdf
codevincent624
 
reactJS
Syam Santhosh
 
Introduction to React JS.pptx
SHAIKIRFAN715544
 
Introduction to ReactJS UI Web Dev .pptx
SHAIKIRFAN715544
 
Fundamental concepts of react js
StephieJohn
 
React JS Interview Question & Answer
Mildain Solutions
 
BackboneJS + ReactJS
Skanda Shastry
 
Materi Modern React Redux Power Point.pdf
exiabreak
 
downloads_introduction to redux.pptx
NavneetKumar111924
 
Presentation1
Kshitiz Rimal
 
Comparing Angular and React JS for SPAs
Jennifer Estrada
 
React JS: A Secret Preview
valuebound
 
A React Journey
LinkMe Srl
 
unit 3_Adv WTAdvanced Web Tecg Design_HTML_CSS_JAVASCRIPT_AJAX_PPT.pdf
GauravDwivedi695361
 
Reactjs notes.pptx for web development- tutorial and theory
jobinThomas54
 
REACTJS.pdf
ArthyR3
 
Ad

Recently uploaded (20)

PDF
lesson-2-rules-of-netiquette.pdf.bshhsjdj
jasmenrojas249
 
PPTX
Presentation about variables and constant.pptx
safalsingh810
 
PDF
Protecting the Digital World Cyber Securit
dnthakkar16
 
PDF
advancepresentationskillshdhdhhdhdhdhhfhf
jasmenrojas249
 
PDF
49784907924775488180_LRN2959_Data_Pump_23ai.pdf
Abilash868456
 
PPTX
oapresentation.pptx
mehatdhavalrajubhai
 
PPT
Activate_Methodology_Summary presentatio
annapureddyn
 
PDF
What to consider before purchasing Microsoft 365 Business Premium_PDF.pdf
Q-Advise
 
PPTX
Services offered by Dynamic Solutions in Pakistan
DaniyaalAdeemShibli1
 
PDF
Become an Agentblazer Champion Challenge Kickoff
Dele Amefo
 
PPTX
ConcordeApp: Engineering Global Impact & Unlocking Billions in Event ROI with AI
chastechaste14
 
PDF
Exploring AI Agents in Process Industries
amoreira6
 
PPTX
The-Dawn-of-AI-Reshaping-Our-World.pptxx
parthbhanushali307
 
PPTX
Web Testing.pptx528278vshbuqffqhhqiwnwuq
studylike474
 
PDF
ShowUs: Pharo Stream Deck (ESUG 2025, Gdansk)
ESUG
 
PPTX
slidesgo-unlocking-the-code-the-dynamic-dance-of-variables-and-constants-2024...
kr2589474
 
PDF
Multi-factor Authentication (MFA) requirement for Microsoft 365 Admin Center_...
Q-Advise
 
PPTX
Explanation about Structures in C language.pptx
Veeral Rathod
 
PDF
Appium Automation Testing Tutorial PDF: Learn Mobile Testing in 7 Days
jamescantor38
 
PDF
Microsoft Teams Essentials; The pricing and the versions_PDF.pdf
Q-Advise
 
lesson-2-rules-of-netiquette.pdf.bshhsjdj
jasmenrojas249
 
Presentation about variables and constant.pptx
safalsingh810
 
Protecting the Digital World Cyber Securit
dnthakkar16
 
advancepresentationskillshdhdhhdhdhdhhfhf
jasmenrojas249
 
49784907924775488180_LRN2959_Data_Pump_23ai.pdf
Abilash868456
 
oapresentation.pptx
mehatdhavalrajubhai
 
Activate_Methodology_Summary presentatio
annapureddyn
 
What to consider before purchasing Microsoft 365 Business Premium_PDF.pdf
Q-Advise
 
Services offered by Dynamic Solutions in Pakistan
DaniyaalAdeemShibli1
 
Become an Agentblazer Champion Challenge Kickoff
Dele Amefo
 
ConcordeApp: Engineering Global Impact & Unlocking Billions in Event ROI with AI
chastechaste14
 
Exploring AI Agents in Process Industries
amoreira6
 
The-Dawn-of-AI-Reshaping-Our-World.pptxx
parthbhanushali307
 
Web Testing.pptx528278vshbuqffqhhqiwnwuq
studylike474
 
ShowUs: Pharo Stream Deck (ESUG 2025, Gdansk)
ESUG
 
slidesgo-unlocking-the-code-the-dynamic-dance-of-variables-and-constants-2024...
kr2589474
 
Multi-factor Authentication (MFA) requirement for Microsoft 365 Admin Center_...
Q-Advise
 
Explanation about Structures in C language.pptx
Veeral Rathod
 
Appium Automation Testing Tutorial PDF: Learn Mobile Testing in 7 Days
jamescantor38
 
Microsoft Teams Essentials; The pricing and the versions_PDF.pdf
Q-Advise
 

Presentation on "An Introduction to ReactJS"

  • 2. What is React? - React is a Javascript framework that focuses on declarative syntax and virtualization of DOM. - It is an open-source Javascript library, Developed by Meta in 2013. - It provides a declarative and efficient way to create interactive UI components. - It allows building more reusable and maintainable UI components with ease.
  • 3. Why React? Virtual DOM - A Virtual DOM is a lightweight copy of the real DOM. - Traditionally, only way to change content dynamically on web was to manipulate the real DOM. - React's virtual DOM allows for efficient updates and selective rendering, resulting in faster and smoother user experiences.
  • 4. Why React? - Component-based Architecture - ReactJS follows a component-based architecture, where UIs are divided into reusable components. - Traditional web development often involves a mix of HTML, CSS, and JavaScript, leading to tightly coupled code. - React's component-based approach promotes modularity, reusability, and easier maintenance of code.
  • 5. Why React? - Unidirectional Data Flow - ReactJS enforces a unidirectional data flow, also known as one-way binding. - Traditional web development often involves two-way data binding, where changes in one part of the application affect others, making it harder to track and manage data changes. - React's unidirectional data flow simplifies data management, reducing the likelihood of bugs and making the application easier to reason about.
  • 6. Why React? - State Management - State management is a critical aspect of building complex web applications. - ReactJS provides several options for managing state Efficiently within its ecosystem. - Various ways of State Management: - Local Component State - useState - Context API - Redux
  • 7. What is a React Component? - ReactJS follows a component-based architecture, where UIs are composed of reusable building blocks called components. - A React component is a JavaScript function or class that returns a JSX (JavaScript XML) representation of the UI. - It encapsulates the UI logic and state, making it reusable and modular. - React supports two ways of declaring a component- - Class Components - Functional Components
  • 8. Structure of React Component - Props - Props allow passing data from parent components to child components. - Props are read-only and should not be modified within the component. - State - State represents the mutable data within a component. - State is typically managed within class components using the this.state object and the setState method. - Functional components can also have state using React hooks like useState. - Styling - Styling can be applied to React components using CSS classes, inline styles, or CSS-in-JS libraries. - CSS classes can be added using the className attribute in JSX. - Inline styles can be applied using the style attribute in JSX.
  • 9. What is JSX? - JSX (JavaScript XML) is a syntax extension for JavaScript used in React. - JSX allows you to write HTML-like code within JavaScript, making it easier to create and manipulate the UI. - JSX allows embedding JavaScript expressions within curly braces {}. - JSX needs to be compiled into plain JavaScript to be understood by the browser.
  • 10. Component Life Cycle - React components have a life cycle consisting of different phases and methods that are executed at specific times. - The mounting phase is when a new component is created and inserted into the DOM. - The updating phase is when the component updates or re-renders. This reaction is triggered when the props are updated or when the state is updated. - The last phase within a component's lifecycle is the unmounting phase, when the component is removed from the DOM.
  • 11. Life Cycle Hooks - componentDidMount() - This hook is called after a component is mounted (rendered for the first time) in the DOM. - componentDidUpdate(prevProps, prevState) - This hook is called after a component is updated and re-rendered in response to changes in props or state. - componentWillUnmount() - This hook is called just before a component is unmounted and removed from the DOM. - shouldComponentUpdate(nextProps, nextState) - This hook is called before a component is re-rendered and allows you to control if the re- rendering should occur.
  • 12. Running a React Application - To run a React Application, we need to install - NodeJS - Node Package Manager (NPM) - Install create-react-app - npm install -g create-react-app - Create React Application - npx create-react-app my-app - Run development server - cd my-app - npm start - Build Project - npm run build
  • 13. Conclusion - React is a powerful JavaScript library for building user interfaces. - React's component-based architecture and efficient rendering make it a popular choice for front-end development. THANK YOU