SlideShare una empresa de Scribd logo
1 de 34
Descargar para leer sin conexión
WEEKLY PRESENTATION
DURING TRAINING PROGRAM
- Devang Garach
devanggarach.rao@gmail.com
WEEK-5
Information Technology
AGENDA
What is React?
Advantages & Disadvantages of React
What is DOM, Virtual DOM and How React use it?
React JSX and ES6
Installation of React and creation of application, first app.
Get start with First-Project
React Components
ReactJS Lifecycle and Methods
State and Props in React
Information Technology
DURING TRAINING PROGRAM - WEEKLY PRESENTATION
What is React?
React is an open-source, front end, JavaScript library for building user
interfaces or UI components.
It is maintained by Facebook and a community of individual developers and
companies.
React can be used as a base in the development of single-page or mobile
applications.
Efficiently updates and renders the right components when your data
changes
Information Technology
DURING TRAINING PROGRAM - WEEKLY PRESENTATION
What is React? (Continue...)
Why was React developed?
● Complexity of two-way data binding
● Bad UX from using “Cascading Updates” of DOM tree
● A lot of data on page changing over time
● Shift from MVC mentality.
Information Technology
DURING TRAINING PROGRAM - WEEKLY PRESENTATION
What is React? (Continue...)
Information Technology
DURING TRAINING PROGRAM - WEEKLY PRESENTATION
(source : airbnb.co.in)
Advantages & Disadvantages of React
Information Technology
DURING TRAINING PROGRAM - WEEKLY PRESENTATION
Advantages Disadvantages
Easy to learn, easy to use Higher pace of development
Reusable components Poor documentation
The Virtual DOM React JS is only a view layer
Great Developer Tools We have to learn JSX
Scope of testing the codes, easy to test & debug.
Faster display of great numbers of components
What is DOM, Virtual DOM and How React use it
Information Technology
DURING TRAINING PROGRAM - WEEKLY PRESENTATION
DOM (Document Object Model)
What is DOM, Virtual DOM and How React use it
Information Technology
DURING TRAINING PROGRAM - WEEKLY PRESENTATION
Virtual DOM Example
Something changes in components
React JSX and ES6
What is JSX?
JSX stands for JavaScript XML.
JSX allows us to write HTML in React.
JSX makes it easier to write and add HTML in React.
(It is not necessary to use JSX, but JSX makes it easier to write React
applications)
Information Technology
DURING TRAINING PROGRAM - WEEKLY PRESENTATION
const myelement = <h1>JSX is too easy!</h1>;
ReactDOM.render(myelement, document.getElementById('root'));
React JSX and ES6
What is ES6?
ES6 stands for ECMAScript was the second major version of JavaScript
ECMAScript 6 is also known as ES6 and ECMAScript 2015,
New Features introduced in ES6
● The let and const keyword
● JavaScript Arrow Functions
● JavaScript For/of
● JavaScript Classes
● JavaScript Promises
● Many more...
Information Technology
DURING TRAINING PROGRAM - WEEKLY PRESENTATION
Installation of React and creation of application, first app.
Information Technology
DURING TRAINING PROGRAM - WEEKLY PRESENTATION
Before we get started, react installation or to create application, we require
to learn npm and its commands.
What is NPM?
NPM stands for Node Package Manager
npm is the package manager for the Node JavaScript platform. It puts
modules in place so that node can find them, and manages dependency
conflicts intelligently. Most commonly, it is used to publish, discover, install,
and develop node programs.
Installation of React and creation of application, first app.
(Continue...)
Information Technology
DURING TRAINING PROGRAM - WEEKLY PRESENTATION
Before using NPM commands we have to install, node.
To get Download, nodejs from official website: https://nodejs.org/en/download/
Nodejs is supported all major OS, like Windows, Mac or Linux.
Once nodejs is installed in you OS. Verify the version of node js and npm.
> node -v
> npm -v
Installation of React and creation of application, first app.
(Continue...)
Information Technology
DURING TRAINING PROGRAM - WEEKLY PRESENTATION
To create an React Application we use npm command
> npm install -g create-react-app
> cd <my-directory>
> npx create-react-app <project-name>
Once it has been created, we can start our application.
> npm start
Information Technology
DURING TRAINING PROGRAM - WEEKLY PRESENTATION
Installation of React and creation of application, first app.
(Continue...)
Information Technology
DURING TRAINING PROGRAM - WEEKLY PRESENTATION
<= File Structure after created react application
Get start with First-Project
After we go inside of our project directory
> npm start
Information Technology
DURING TRAINING PROGRAM - WEEKLY PRESENTATION
Information Technology
DURING TRAINING PROGRAM - WEEKLY PRESENTATION
Information Technology
DURING TRAINING PROGRAM - WEEKLY PRESENTATION
<= File Structure of React JS Project first-app
Information Technology
DURING TRAINING PROGRAM - WEEKLY PRESENTATION
Information Technology
DURING TRAINING PROGRAM - WEEKLY PRESENTATION
Information Technology
DURING TRAINING PROGRAM - WEEKLY PRESENTATION
ReactJS Components
Before we start with Lifecycle and methods we have to learn more about React
Components.
Components are independent and reusable bits of code. They serve the same
purpose as JavaScript functions, but work in isolation and return HTML via a
render() function. Components come in two types, Class components and Function
components.
Information Technology
DURING TRAINING PROGRAM - WEEKLY PRESENTATION
Information Technology
DURING TRAINING PROGRAM - WEEKLY PRESENTATION
Function Component
CommonFunctionalComponent.js
Information Technology
DURING TRAINING PROGRAM - WEEKLY PRESENTATION
App.js File
Importing Function Component
into App.js
<CommonFunctionalComponent/>
Information Technology
DURING TRAINING PROGRAM - WEEKLY PRESENTATION
Information Technology
DURING TRAINING PROGRAM - WEEKLY PRESENTATION
Class Component
CommonClassComponent.js
Information Technology
DURING TRAINING PROGRAM - WEEKLY PRESENTATION
App.js File
Importing Function Component
and Class Component, both into
App.js
<CommonFunctionalComponent/>
<CommonClassComponent/>
ReactJS Lifecycle and Methods
Each component in React has a lifecycle which we can monitor and manipulate
during its Four phases.
The Four phases are: Mounting, Updating, Unmounting and Error Handling.
Information Technology
DURING TRAINING PROGRAM - WEEKLY PRESENTATION
ReactJS Lifecycle and Methods (Continue...)
Information Technology
DURING TRAINING PROGRAM - WEEKLY PRESENTATION
Phases Description
Mounting When an instance of a component is being created or inserted into the DOM
Constructor()
static getDerivedStateFromProps()
render()
componentDidMount()
Updating When a component is being re-rendered as a result of changes to either its props or state
static getDerivedStateFromProps()
shouldComponentUpdate()
Render()
getSnapshotBeforeUpdate()
componentDidUpdate()
ReactJS Lifecycle and Methods (Continue...)
Information Technology
DURING TRAINING PROGRAM - WEEKLY PRESENTATION
Phases Description
UnMounting When a component is being removed from the DOM
componentWillUnmount()
Error Handling When there is an error during rendering. In a lifecycle method, or in the constructor of any child
component.
static getDerivedStateFromError() and ComponentDidCatch()
State and Props in React
React props:
Props are arguments passed into React components.
Props are passed to components via HTML attributes.
React state:
React components has a built-in state object.
The state object is where you store property values that belongs to the
component.
When the state object changes, the component re-renders.
Information Technology
DURING TRAINING PROGRAM - WEEKLY PRESENTATION
State and Props in React (Continue...)
Props example: (source: w3school.com)
import React from 'react';
import ReactDOM from 'react-dom';
class Car extends React.Component
{
render(){
return <h2>I am a {this.props.brand}!</h2>
}
}
const myelement = <Car brand="Ford" />;
ReactDOM.render(myelement, document.getElementById('root'));
Information Technology
DURING TRAINING PROGRAM - WEEKLY PRESENTATION
State and Props in React (Continue...)
State example: (source: w3school.com)
import React from 'react';
import ReactDOM from 'react-dom';
class Car extends React.Component{
constructor(props){
super(props);
this.state = {
brand: "Ford",
model: "Mustang",
color: "red",
year: 1964 };
}
render(){
return(<div><h1>My {this.state.brand}</h1>
<p>It is a {this.state.color} {this.state.model} from {this.state.year}. </p>
</div>);
} }
ReactDOM.render(<Car />, document.getElementById('root'));
Information Technology
DURING TRAINING PROGRAM - WEEKLY PRESENTATION
Information Technology
Thank You.
- Devang Garach
devanggarach.rao@gmail.com

Más contenido relacionado

La actualidad más candente

React JS - A quick introduction tutorial
React JS - A quick introduction tutorialReact JS - A quick introduction tutorial
React JS - A quick introduction tutorialMohammed Fazuluddin
 
React workshop presentation
React workshop presentationReact workshop presentation
React workshop presentationBojan Golubović
 
Introduction to React JS for beginners
Introduction to React JS for beginners Introduction to React JS for beginners
Introduction to React JS for beginners Varun Raj
 
Introduction to react_js
Introduction to react_jsIntroduction to react_js
Introduction to react_jsMicroPyramid .
 
Build web apps with react js
Build web apps with react jsBuild web apps with react js
Build web apps with react jsdhanushkacnd
 
React Router: React Meetup XXL
React Router: React Meetup XXLReact Router: React Meetup XXL
React Router: React Meetup XXLRob Gietema
 
Full stack web development
Full stack web developmentFull stack web development
Full stack web developmentCrampete
 
An introduction to React.js
An introduction to React.jsAn introduction to React.js
An introduction to React.jsEmanuele DelBono
 
Introduction to React JS for beginners | Namespace IT
Introduction to React JS for beginners | Namespace ITIntroduction to React JS for beginners | Namespace IT
Introduction to React JS for beginners | Namespace ITnamespaceit
 

La actualidad más candente (20)

Reactjs
Reactjs Reactjs
Reactjs
 
React js
React jsReact js
React js
 
React JS - A quick introduction tutorial
React JS - A quick introduction tutorialReact JS - A quick introduction tutorial
React JS - A quick introduction tutorial
 
React workshop
React workshopReact workshop
React workshop
 
Reactjs
ReactjsReactjs
Reactjs
 
React workshop presentation
React workshop presentationReact workshop presentation
React workshop presentation
 
Intro to React
Intro to ReactIntro to React
Intro to React
 
Introduction to React JS for beginners
Introduction to React JS for beginners Introduction to React JS for beginners
Introduction to React JS for beginners
 
Introduction to react_js
Introduction to react_jsIntroduction to react_js
Introduction to react_js
 
reactJS
reactJSreactJS
reactJS
 
Build web apps with react js
Build web apps with react jsBuild web apps with react js
Build web apps with react js
 
React and redux
React and reduxReact and redux
React and redux
 
React Router: React Meetup XXL
React Router: React Meetup XXLReact Router: React Meetup XXL
React Router: React Meetup XXL
 
React Native Workshop
React Native WorkshopReact Native Workshop
React Native Workshop
 
React Native
React NativeReact Native
React Native
 
Full stack web development
Full stack web developmentFull stack web development
Full stack web development
 
An introduction to React.js
An introduction to React.jsAn introduction to React.js
An introduction to React.js
 
Intro to React
Intro to ReactIntro to React
Intro to React
 
React JS - Introduction
React JS - IntroductionReact JS - Introduction
React JS - Introduction
 
Introduction to React JS for beginners | Namespace IT
Introduction to React JS for beginners | Namespace ITIntroduction to React JS for beginners | Namespace IT
Introduction to React JS for beginners | Namespace IT
 

Similar a Overview of React.JS - Internship Presentation - Week 5

FRONTEND DEVELOPMENT WITH REACT.JS
FRONTEND DEVELOPMENT WITH REACT.JSFRONTEND DEVELOPMENT WITH REACT.JS
FRONTEND DEVELOPMENT WITH REACT.JSIRJET Journal
 
React JS: A Secret Preview
React JS: A Secret PreviewReact JS: A Secret Preview
React JS: A Secret Previewvaluebound
 
React Native +Redux + ES6 (Updated)
React Native +Redux + ES6 (Updated)React Native +Redux + ES6 (Updated)
React Native +Redux + ES6 (Updated)Chiew Carol
 
React_Complete.pptx
React_Complete.pptxReact_Complete.pptx
React_Complete.pptxkamalakantas
 
Improve your Web Development using Visual Studio 2010
Improve your Web Development using Visual Studio 2010Improve your Web Development using Visual Studio 2010
Improve your Web Development using Visual Studio 2010Suthep Sangvirotjanaphat
 
How create react app help in creating a new react applications
How create react app help in creating a new react applications How create react app help in creating a new react applications
How create react app help in creating a new react applications Concetto Labs
 
Fundamental concepts of react js
Fundamental concepts of react jsFundamental concepts of react js
Fundamental concepts of react jsStephieJohn
 
React Native for multi-platform mobile applications
React Native for multi-platform mobile applicationsReact Native for multi-platform mobile applications
React Native for multi-platform mobile applicationsMatteo Manchi
 
How To Integrate Native Android App With React Native.
How To Integrate Native Android App With React Native.How To Integrate Native Android App With React Native.
How To Integrate Native Android App With React Native.Techugo
 
Full Stack React Workshop [CSSC x GDSC]
Full Stack React Workshop [CSSC x GDSC]Full Stack React Workshop [CSSC x GDSC]
Full Stack React Workshop [CSSC x GDSC]GDSC UofT Mississauga
 
React - Start learning today
React - Start learning today React - Start learning today
React - Start learning today Nitin Tyagi
 
TDC São Paulo - React presentation
TDC São Paulo - React presentationTDC São Paulo - React presentation
TDC São Paulo - React presentationDanillo Corvalan
 
Struts & hibernate ppt
Struts & hibernate pptStruts & hibernate ppt
Struts & hibernate pptPankaj Patel
 

Similar a Overview of React.JS - Internship Presentation - Week 5 (20)

FRONTEND DEVELOPMENT WITH REACT.JS
FRONTEND DEVELOPMENT WITH REACT.JSFRONTEND DEVELOPMENT WITH REACT.JS
FRONTEND DEVELOPMENT WITH REACT.JS
 
React JS: A Secret Preview
React JS: A Secret PreviewReact JS: A Secret Preview
React JS: A Secret Preview
 
React Native +Redux + ES6 (Updated)
React Native +Redux + ES6 (Updated)React Native +Redux + ES6 (Updated)
React Native +Redux + ES6 (Updated)
 
React_Complete.pptx
React_Complete.pptxReact_Complete.pptx
React_Complete.pptx
 
Improve your Web Development using Visual Studio 2010
Improve your Web Development using Visual Studio 2010Improve your Web Development using Visual Studio 2010
Improve your Web Development using Visual Studio 2010
 
How create react app help in creating a new react applications
How create react app help in creating a new react applications How create react app help in creating a new react applications
How create react app help in creating a new react applications
 
Fundamental concepts of react js
Fundamental concepts of react jsFundamental concepts of react js
Fundamental concepts of react js
 
Tech Talk on ReactJS
Tech Talk on ReactJSTech Talk on ReactJS
Tech Talk on ReactJS
 
React Native for multi-platform mobile applications
React Native for multi-platform mobile applicationsReact Native for multi-platform mobile applications
React Native for multi-platform mobile applications
 
How To Integrate Native Android App With React Native.
How To Integrate Native Android App With React Native.How To Integrate Native Android App With React Native.
How To Integrate Native Android App With React Native.
 
Web summit.pptx
Web summit.pptxWeb summit.pptx
Web summit.pptx
 
Full Stack React Workshop [CSSC x GDSC]
Full Stack React Workshop [CSSC x GDSC]Full Stack React Workshop [CSSC x GDSC]
Full Stack React Workshop [CSSC x GDSC]
 
React - Start learning today
React - Start learning today React - Start learning today
React - Start learning today
 
learning react
learning reactlearning react
learning react
 
NEXT.JS
NEXT.JSNEXT.JS
NEXT.JS
 
React django
React djangoReact django
React django
 
TDC São Paulo - React presentation
TDC São Paulo - React presentationTDC São Paulo - React presentation
TDC São Paulo - React presentation
 
Abhishek_Kumar
Abhishek_KumarAbhishek_Kumar
Abhishek_Kumar
 
Struts & hibernate ppt
Struts & hibernate pptStruts & hibernate ppt
Struts & hibernate ppt
 
What is ReactJS?
What is ReactJS?What is ReactJS?
What is ReactJS?
 

Más de Devang Garach

AWS Concepts - Internship Presentation - week 10
AWS Concepts - Internship Presentation - week 10AWS Concepts - Internship Presentation - week 10
AWS Concepts - Internship Presentation - week 10Devang Garach
 
A glimpse inside of SEO - Internship Presentation - week 9
A glimpse inside of SEO - Internship Presentation - week 9A glimpse inside of SEO - Internship Presentation - week 9
A glimpse inside of SEO - Internship Presentation - week 9Devang Garach
 
Machine Learning and its types - Internship Presentation - week 8
Machine Learning and its types - Internship Presentation - week 8Machine Learning and its types - Internship Presentation - week 8
Machine Learning and its types - Internship Presentation - week 8Devang Garach
 
Fundamental of Node.JS - Internship Presentation - Week7
Fundamental of Node.JS - Internship Presentation - Week7Fundamental of Node.JS - Internship Presentation - Week7
Fundamental of Node.JS - Internship Presentation - Week7Devang Garach
 
Advanced JavaScript - Internship Presentation - Week6
Advanced JavaScript - Internship Presentation - Week6Advanced JavaScript - Internship Presentation - Week6
Advanced JavaScript - Internship Presentation - Week6Devang Garach
 
Brief Introduction on JavaScript - Internship Presentation - Week4
Brief Introduction on JavaScript - Internship Presentation - Week4Brief Introduction on JavaScript - Internship Presentation - Week4
Brief Introduction on JavaScript - Internship Presentation - Week4Devang Garach
 
Intro to HTML, CSS & JS - Internship Presentation Week-3
Intro to HTML, CSS & JS - Internship Presentation Week-3Intro to HTML, CSS & JS - Internship Presentation Week-3
Intro to HTML, CSS & JS - Internship Presentation Week-3Devang Garach
 
Basics of Linux Commands, Git and Github
Basics of Linux Commands, Git and GithubBasics of Linux Commands, Git and Github
Basics of Linux Commands, Git and GithubDevang Garach
 
M.C.A. Internship Project Presentation - Devang Garach [191823011]
M.C.A. Internship Project Presentation - Devang Garach [191823011]M.C.A. Internship Project Presentation - Devang Garach [191823011]
M.C.A. Internship Project Presentation - Devang Garach [191823011]Devang Garach
 

Más de Devang Garach (9)

AWS Concepts - Internship Presentation - week 10
AWS Concepts - Internship Presentation - week 10AWS Concepts - Internship Presentation - week 10
AWS Concepts - Internship Presentation - week 10
 
A glimpse inside of SEO - Internship Presentation - week 9
A glimpse inside of SEO - Internship Presentation - week 9A glimpse inside of SEO - Internship Presentation - week 9
A glimpse inside of SEO - Internship Presentation - week 9
 
Machine Learning and its types - Internship Presentation - week 8
Machine Learning and its types - Internship Presentation - week 8Machine Learning and its types - Internship Presentation - week 8
Machine Learning and its types - Internship Presentation - week 8
 
Fundamental of Node.JS - Internship Presentation - Week7
Fundamental of Node.JS - Internship Presentation - Week7Fundamental of Node.JS - Internship Presentation - Week7
Fundamental of Node.JS - Internship Presentation - Week7
 
Advanced JavaScript - Internship Presentation - Week6
Advanced JavaScript - Internship Presentation - Week6Advanced JavaScript - Internship Presentation - Week6
Advanced JavaScript - Internship Presentation - Week6
 
Brief Introduction on JavaScript - Internship Presentation - Week4
Brief Introduction on JavaScript - Internship Presentation - Week4Brief Introduction on JavaScript - Internship Presentation - Week4
Brief Introduction on JavaScript - Internship Presentation - Week4
 
Intro to HTML, CSS & JS - Internship Presentation Week-3
Intro to HTML, CSS & JS - Internship Presentation Week-3Intro to HTML, CSS & JS - Internship Presentation Week-3
Intro to HTML, CSS & JS - Internship Presentation Week-3
 
Basics of Linux Commands, Git and Github
Basics of Linux Commands, Git and GithubBasics of Linux Commands, Git and Github
Basics of Linux Commands, Git and Github
 
M.C.A. Internship Project Presentation - Devang Garach [191823011]
M.C.A. Internship Project Presentation - Devang Garach [191823011]M.C.A. Internship Project Presentation - Devang Garach [191823011]
M.C.A. Internship Project Presentation - Devang Garach [191823011]
 

Último

Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxnegromaestrong
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docxPoojaSen20
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfSherif Taha
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxVishalSingh1417
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin ClassesCeline George
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseAnaAcapella
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701bronxfugly43
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 

Último (20)

Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptx
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 

Overview of React.JS - Internship Presentation - Week 5

  • 1. WEEKLY PRESENTATION DURING TRAINING PROGRAM - Devang Garach devanggarach.rao@gmail.com WEEK-5 Information Technology
  • 2. AGENDA What is React? Advantages & Disadvantages of React What is DOM, Virtual DOM and How React use it? React JSX and ES6 Installation of React and creation of application, first app. Get start with First-Project React Components ReactJS Lifecycle and Methods State and Props in React Information Technology DURING TRAINING PROGRAM - WEEKLY PRESENTATION
  • 3. What is React? React is an open-source, front end, JavaScript library for building user interfaces or UI components. It is maintained by Facebook and a community of individual developers and companies. React can be used as a base in the development of single-page or mobile applications. Efficiently updates and renders the right components when your data changes Information Technology DURING TRAINING PROGRAM - WEEKLY PRESENTATION
  • 4. What is React? (Continue...) Why was React developed? ● Complexity of two-way data binding ● Bad UX from using “Cascading Updates” of DOM tree ● A lot of data on page changing over time ● Shift from MVC mentality. Information Technology DURING TRAINING PROGRAM - WEEKLY PRESENTATION
  • 5. What is React? (Continue...) Information Technology DURING TRAINING PROGRAM - WEEKLY PRESENTATION (source : airbnb.co.in)
  • 6. Advantages & Disadvantages of React Information Technology DURING TRAINING PROGRAM - WEEKLY PRESENTATION Advantages Disadvantages Easy to learn, easy to use Higher pace of development Reusable components Poor documentation The Virtual DOM React JS is only a view layer Great Developer Tools We have to learn JSX Scope of testing the codes, easy to test & debug. Faster display of great numbers of components
  • 7. What is DOM, Virtual DOM and How React use it Information Technology DURING TRAINING PROGRAM - WEEKLY PRESENTATION DOM (Document Object Model)
  • 8. What is DOM, Virtual DOM and How React use it Information Technology DURING TRAINING PROGRAM - WEEKLY PRESENTATION Virtual DOM Example Something changes in components
  • 9. React JSX and ES6 What is JSX? JSX stands for JavaScript XML. JSX allows us to write HTML in React. JSX makes it easier to write and add HTML in React. (It is not necessary to use JSX, but JSX makes it easier to write React applications) Information Technology DURING TRAINING PROGRAM - WEEKLY PRESENTATION const myelement = <h1>JSX is too easy!</h1>; ReactDOM.render(myelement, document.getElementById('root'));
  • 10. React JSX and ES6 What is ES6? ES6 stands for ECMAScript was the second major version of JavaScript ECMAScript 6 is also known as ES6 and ECMAScript 2015, New Features introduced in ES6 ● The let and const keyword ● JavaScript Arrow Functions ● JavaScript For/of ● JavaScript Classes ● JavaScript Promises ● Many more... Information Technology DURING TRAINING PROGRAM - WEEKLY PRESENTATION
  • 11. Installation of React and creation of application, first app. Information Technology DURING TRAINING PROGRAM - WEEKLY PRESENTATION Before we get started, react installation or to create application, we require to learn npm and its commands. What is NPM? NPM stands for Node Package Manager npm is the package manager for the Node JavaScript platform. It puts modules in place so that node can find them, and manages dependency conflicts intelligently. Most commonly, it is used to publish, discover, install, and develop node programs.
  • 12. Installation of React and creation of application, first app. (Continue...) Information Technology DURING TRAINING PROGRAM - WEEKLY PRESENTATION Before using NPM commands we have to install, node. To get Download, nodejs from official website: https://nodejs.org/en/download/ Nodejs is supported all major OS, like Windows, Mac or Linux. Once nodejs is installed in you OS. Verify the version of node js and npm. > node -v > npm -v
  • 13. Installation of React and creation of application, first app. (Continue...) Information Technology DURING TRAINING PROGRAM - WEEKLY PRESENTATION To create an React Application we use npm command > npm install -g create-react-app > cd <my-directory> > npx create-react-app <project-name> Once it has been created, we can start our application. > npm start
  • 14. Information Technology DURING TRAINING PROGRAM - WEEKLY PRESENTATION
  • 15. Installation of React and creation of application, first app. (Continue...) Information Technology DURING TRAINING PROGRAM - WEEKLY PRESENTATION <= File Structure after created react application
  • 16. Get start with First-Project After we go inside of our project directory > npm start Information Technology DURING TRAINING PROGRAM - WEEKLY PRESENTATION
  • 17. Information Technology DURING TRAINING PROGRAM - WEEKLY PRESENTATION
  • 18. Information Technology DURING TRAINING PROGRAM - WEEKLY PRESENTATION <= File Structure of React JS Project first-app
  • 19. Information Technology DURING TRAINING PROGRAM - WEEKLY PRESENTATION
  • 20. Information Technology DURING TRAINING PROGRAM - WEEKLY PRESENTATION
  • 21. Information Technology DURING TRAINING PROGRAM - WEEKLY PRESENTATION
  • 22. ReactJS Components Before we start with Lifecycle and methods we have to learn more about React Components. Components are independent and reusable bits of code. They serve the same purpose as JavaScript functions, but work in isolation and return HTML via a render() function. Components come in two types, Class components and Function components. Information Technology DURING TRAINING PROGRAM - WEEKLY PRESENTATION
  • 23. Information Technology DURING TRAINING PROGRAM - WEEKLY PRESENTATION Function Component CommonFunctionalComponent.js
  • 24. Information Technology DURING TRAINING PROGRAM - WEEKLY PRESENTATION App.js File Importing Function Component into App.js <CommonFunctionalComponent/>
  • 25. Information Technology DURING TRAINING PROGRAM - WEEKLY PRESENTATION
  • 26. Information Technology DURING TRAINING PROGRAM - WEEKLY PRESENTATION Class Component CommonClassComponent.js
  • 27. Information Technology DURING TRAINING PROGRAM - WEEKLY PRESENTATION App.js File Importing Function Component and Class Component, both into App.js <CommonFunctionalComponent/> <CommonClassComponent/>
  • 28. ReactJS Lifecycle and Methods Each component in React has a lifecycle which we can monitor and manipulate during its Four phases. The Four phases are: Mounting, Updating, Unmounting and Error Handling. Information Technology DURING TRAINING PROGRAM - WEEKLY PRESENTATION
  • 29. ReactJS Lifecycle and Methods (Continue...) Information Technology DURING TRAINING PROGRAM - WEEKLY PRESENTATION Phases Description Mounting When an instance of a component is being created or inserted into the DOM Constructor() static getDerivedStateFromProps() render() componentDidMount() Updating When a component is being re-rendered as a result of changes to either its props or state static getDerivedStateFromProps() shouldComponentUpdate() Render() getSnapshotBeforeUpdate() componentDidUpdate()
  • 30. ReactJS Lifecycle and Methods (Continue...) Information Technology DURING TRAINING PROGRAM - WEEKLY PRESENTATION Phases Description UnMounting When a component is being removed from the DOM componentWillUnmount() Error Handling When there is an error during rendering. In a lifecycle method, or in the constructor of any child component. static getDerivedStateFromError() and ComponentDidCatch()
  • 31. State and Props in React React props: Props are arguments passed into React components. Props are passed to components via HTML attributes. React state: React components has a built-in state object. The state object is where you store property values that belongs to the component. When the state object changes, the component re-renders. Information Technology DURING TRAINING PROGRAM - WEEKLY PRESENTATION
  • 32. State and Props in React (Continue...) Props example: (source: w3school.com) import React from 'react'; import ReactDOM from 'react-dom'; class Car extends React.Component { render(){ return <h2>I am a {this.props.brand}!</h2> } } const myelement = <Car brand="Ford" />; ReactDOM.render(myelement, document.getElementById('root')); Information Technology DURING TRAINING PROGRAM - WEEKLY PRESENTATION
  • 33. State and Props in React (Continue...) State example: (source: w3school.com) import React from 'react'; import ReactDOM from 'react-dom'; class Car extends React.Component{ constructor(props){ super(props); this.state = { brand: "Ford", model: "Mustang", color: "red", year: 1964 }; } render(){ return(<div><h1>My {this.state.brand}</h1> <p>It is a {this.state.color} {this.state.model} from {this.state.year}. </p> </div>); } } ReactDOM.render(<Car />, document.getElementById('root')); Information Technology DURING TRAINING PROGRAM - WEEKLY PRESENTATION
  • 34. Information Technology Thank You. - Devang Garach devanggarach.rao@gmail.com