SlideShare uma empresa Scribd logo
1 de 30
Introduction to
React
What is React.js?
• A JavaScript library for building user
interfaces.
• Developed by Facebook
• React is VIEW in MVC
• Suitable for dynamic websites
Fast
Apps are made in React can handle
complex updates and still feel
quick responsive
Modular
Instead of writing large, dense files of
code,you can write many smaller,reusable
file.React’s modularity can be a beautiful
solution to javascript maintability
problems
Scalable
Large programs that display a lot
of changing data are where react
perform best
Popular
While this reason has admittedly
little to do with reacts quality the
truth is that understanding react
will make you more employable
Flexible
You can use React for interesting
projects that have nothing to do
with making web apps
Here are just few of the reason why people
choose to program with react
Who is using React?
Why React.js?
• V(view) of MVC - Solution of View in MVC
• Virtual DOM - Reactjs use the concept of virtual DOM which helps in the performance
• Unidirectional Data Flow - Compare to the 2 way data binding. Reactjs use the concept of
Unidirectional data flow which improve the over all performance.
• UI Components - Reusable and interactive components
• Coding is simpler because of JSX
• Reactjs own debugger
• React Native is going to be next big thing
• Big minds are backing Reactjs
ReactJs is V in MVC
Controller
Model Model Model
View
Core Concepts
JSX
JSX - javascript XML syntax transform.
It helps in making our writing code easier and
faster. JSX lets us writeHTML (not 100%) with XML
based object representation.
Line 8-19 : Telling browser the code between the script block is JSX and not
normal JavaScript.
Line no 12 : This is how we write the HTML in JSX
Components
In Reactjs the whole application is break into the
components. Components are interactive, reusable
and stageful too.
Unidirectional Data Flow
- As compare to other MVC frameworks/Library Reactjs use the concept
of unidirectional data flow.
- In Reactjs application the data flow from the parent to the children
component by the state and the props.
- Only one parent is responsible to update the states and passing the
value to the children components via props.
- setState is used to update/refresh the UI when the state change and
the value can be pass to the children component by the this.props
Virtual DOM
• Reactjs uses the concept of the virtual DOM.
• It selectively render the subtree of DOM elements into the
rendering of the DOM on state change
• Use different algorithm with the browser DOM tree to identify
the changes
• Instead of creating new object, Reactjs just identify what
change is took place and once identify update that state.
• This way it is creating a virtual DOM and improving the
performance too
• Can be render on server and sync on Local
Traditional
Web App
React
Web App
On Every Update…
• React builds a new virtual DOM
subtree
• Diff it with the old one
• Computes the minimal set of
DOM mutations and puts them in
a queue
• Batch executes all updates
Lets Start
• Download react
• Download JSX
• Install React debugger tool (Chrome)
Components
• Everything in reactjs is components. The core building
blocks of React application is components only.
Components interact with each other and maintain the
state too. In Reactjs whole application is need to be
break into the component only.
props
• In Reactjs props are like the HTML Properties. They are
used to pass the data between the components or via the
states. In Reactjs the props can be accessed by
this.props.propsname
• Props can be define by name=“value”. To access this we
have to call this.props.name
states
Every component has a State object. Can be set by using
setState. setState triggers UI updates and to get the initial
state before the setState : getInitialState.getDefaultProps
Reactjs maintained the state – getIntialState, setState, getDefaultProps.
In the above example we are getting the count variable to 5 and
accessing it by {this.state.count}
Events
• Reactjs has the events that are attached
with the components as the props of the
components and can trigger methods.
We have created a custom method clickCount and onClick of the button we
are calling it onClick = {this.clickCount}
Angular Backbone React
Type MV* MVC V
Technology HTML/CSS/JS/A
ngular
HTML/CSS/JS/b
ackbone
JSX
Core MVC MVC Components
View HTML HTML Virtual DOM
Data Flowing 2 way binding - Unidirectional
Creator Google - FB* & Instagram
Architchure - - React Native &
Flux
SEO Support Phantom js - SEO friendly
Sources
•facebook.github.io/react
•Google
•Scotch.io
•Opensourceforu.org
•edX.org
THANK YOU

Mais conteúdo relacionado

Mais procurados

Mais procurados (20)

React js programming concept
React js programming conceptReact js programming concept
React js programming concept
 
Introduction to React
Introduction to ReactIntroduction to React
Introduction to React
 
Reactjs
ReactjsReactjs
Reactjs
 
React Js Simplified
React Js SimplifiedReact Js Simplified
React Js Simplified
 
Intro to React
Intro to ReactIntro to React
Intro to React
 
An introduction to React.js
An introduction to React.jsAn introduction to React.js
An introduction to React.js
 
ReactJS presentation
ReactJS presentationReactJS presentation
ReactJS presentation
 
React JS - A quick introduction tutorial
React JS - A quick introduction tutorialReact JS - A quick introduction tutorial
React JS - A quick introduction tutorial
 
ReactJS
ReactJSReactJS
ReactJS
 
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
 
Introduction to React JS
Introduction to React JSIntroduction to React JS
Introduction to React JS
 
Learn react-js
Learn react-jsLearn react-js
Learn react-js
 
Reactjs workshop
Reactjs workshop Reactjs workshop
Reactjs workshop
 
React js
React jsReact js
React js
 
Introduction to React JS for beginners
Introduction to React JS for beginners Introduction to React JS for beginners
Introduction to React JS for beginners
 
React js for beginners
React js for beginnersReact js for beginners
React js for beginners
 
React js - The Core Concepts
React js - The Core ConceptsReact js - The Core Concepts
React js - The Core Concepts
 
Introduction to react_js
Introduction to react_jsIntroduction to react_js
Introduction to react_js
 
React js
React jsReact js
React js
 
React-JS.pptx
React-JS.pptxReact-JS.pptx
React-JS.pptx
 

Semelhante a reactJS

Introduction to ReactJS UI Web Dev .pptx
Introduction to ReactJS UI Web Dev .pptxIntroduction to ReactJS UI Web Dev .pptx
Introduction to ReactJS UI Web Dev .pptx
SHAIKIRFAN715544
 
Reactjs notes.pptx for web development- tutorial and theory
Reactjs  notes.pptx for web development- tutorial and theoryReactjs  notes.pptx for web development- tutorial and theory
Reactjs notes.pptx for web development- tutorial and theory
jobinThomas54
 
Presentation on "An Introduction to ReactJS"
Presentation on "An Introduction to ReactJS"Presentation on "An Introduction to ReactJS"
Presentation on "An Introduction to ReactJS"
Flipkart
 

Semelhante a reactJS (20)

Getting started with react & redux
Getting started with react & reduxGetting started with react & redux
Getting started with react & redux
 
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
 
Introduction to React JS.pptx
Introduction to React JS.pptxIntroduction to React JS.pptx
Introduction to React JS.pptx
 
Introduction to ReactJS UI Web Dev .pptx
Introduction to ReactJS UI Web Dev .pptxIntroduction to ReactJS UI Web Dev .pptx
Introduction to ReactJS UI Web Dev .pptx
 
Reactjs notes.pptx for web development- tutorial and theory
Reactjs  notes.pptx for web development- tutorial and theoryReactjs  notes.pptx for web development- tutorial and theory
Reactjs notes.pptx for web development- tutorial and theory
 
React JS Interview Question & Answer
React JS Interview Question & AnswerReact JS Interview Question & Answer
React JS Interview Question & Answer
 
react js training|react js training in mumbai|
react js training|react js training in mumbai|react js training|react js training in mumbai|
react js training|react js training in mumbai|
 
Techpaathshala ReactJS .pdf
Techpaathshala ReactJS .pdfTechpaathshala ReactJS .pdf
Techpaathshala ReactJS .pdf
 
REACTJS.pdf
REACTJS.pdfREACTJS.pdf
REACTJS.pdf
 
React Interview Question & Answers PDF By ScholarHat
React Interview Question & Answers PDF By ScholarHatReact Interview Question & Answers PDF By ScholarHat
React Interview Question & Answers PDF By ScholarHat
 
React + Redux + TypeScript === ♥
React + Redux + TypeScript === ♥React + Redux + TypeScript === ♥
React + Redux + TypeScript === ♥
 
React
ReactReact
React
 
Presentation on "An Introduction to ReactJS"
Presentation on "An Introduction to ReactJS"Presentation on "An Introduction to ReactJS"
Presentation on "An Introduction to ReactJS"
 
An Overview of the React Ecosystem
An Overview of the React EcosystemAn Overview of the React Ecosystem
An Overview of the React Ecosystem
 
JOSA TechTalks - Better Web Apps with React and Redux
JOSA TechTalks - Better Web Apps with React and ReduxJOSA TechTalks - Better Web Apps with React and Redux
JOSA TechTalks - Better Web Apps with React and Redux
 
React.js vs node.js
React.js vs node.jsReact.js vs node.js
React.js vs node.js
 
Maximize Development Efficiency with ReactJS.pdf
Maximize Development Efficiency with ReactJS.pdfMaximize Development Efficiency with ReactJS.pdf
Maximize Development Efficiency with ReactJS.pdf
 
FRONTEND DEVELOPMENT WITH REACT.JS
FRONTEND DEVELOPMENT WITH REACT.JSFRONTEND DEVELOPMENT WITH REACT.JS
FRONTEND DEVELOPMENT WITH REACT.JS
 
what is context API and How it works in React.pptx
what is context API and How it works in React.pptxwhat is context API and How it works in React.pptx
what is context API and How it works in React.pptx
 
Copy of React_JS_Notes.pdf
Copy of React_JS_Notes.pdfCopy of React_JS_Notes.pdf
Copy of React_JS_Notes.pdf
 

Último

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Último (20)

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 

reactJS

  • 2.
  • 3.
  • 4. What is React.js? • A JavaScript library for building user interfaces. • Developed by Facebook • React is VIEW in MVC • Suitable for dynamic websites
  • 5. Fast Apps are made in React can handle complex updates and still feel quick responsive Modular Instead of writing large, dense files of code,you can write many smaller,reusable file.React’s modularity can be a beautiful solution to javascript maintability problems Scalable Large programs that display a lot of changing data are where react perform best Popular While this reason has admittedly little to do with reacts quality the truth is that understanding react will make you more employable Flexible You can use React for interesting projects that have nothing to do with making web apps Here are just few of the reason why people choose to program with react
  • 6. Who is using React?
  • 7.
  • 9. • V(view) of MVC - Solution of View in MVC • Virtual DOM - Reactjs use the concept of virtual DOM which helps in the performance • Unidirectional Data Flow - Compare to the 2 way data binding. Reactjs use the concept of Unidirectional data flow which improve the over all performance. • UI Components - Reusable and interactive components • Coding is simpler because of JSX • Reactjs own debugger • React Native is going to be next big thing • Big minds are backing Reactjs
  • 10. ReactJs is V in MVC Controller Model Model Model View
  • 12. JSX JSX - javascript XML syntax transform. It helps in making our writing code easier and faster. JSX lets us writeHTML (not 100%) with XML based object representation.
  • 13. Line 8-19 : Telling browser the code between the script block is JSX and not normal JavaScript. Line no 12 : This is how we write the HTML in JSX
  • 14. Components In Reactjs the whole application is break into the components. Components are interactive, reusable and stageful too.
  • 15. Unidirectional Data Flow - As compare to other MVC frameworks/Library Reactjs use the concept of unidirectional data flow. - In Reactjs application the data flow from the parent to the children component by the state and the props. - Only one parent is responsible to update the states and passing the value to the children components via props. - setState is used to update/refresh the UI when the state change and the value can be pass to the children component by the this.props
  • 16.
  • 17. Virtual DOM • Reactjs uses the concept of the virtual DOM. • It selectively render the subtree of DOM elements into the rendering of the DOM on state change • Use different algorithm with the browser DOM tree to identify the changes • Instead of creating new object, Reactjs just identify what change is took place and once identify update that state. • This way it is creating a virtual DOM and improving the performance too • Can be render on server and sync on Local
  • 19. On Every Update… • React builds a new virtual DOM subtree • Diff it with the old one • Computes the minimal set of DOM mutations and puts them in a queue • Batch executes all updates
  • 20. Lets Start • Download react • Download JSX • Install React debugger tool (Chrome)
  • 21. Components • Everything in reactjs is components. The core building blocks of React application is components only. Components interact with each other and maintain the state too. In Reactjs whole application is need to be break into the component only.
  • 22.
  • 23. props • In Reactjs props are like the HTML Properties. They are used to pass the data between the components or via the states. In Reactjs the props can be accessed by this.props.propsname • Props can be define by name=“value”. To access this we have to call this.props.name
  • 24. states Every component has a State object. Can be set by using setState. setState triggers UI updates and to get the initial state before the setState : getInitialState.getDefaultProps
  • 25. Reactjs maintained the state – getIntialState, setState, getDefaultProps. In the above example we are getting the count variable to 5 and accessing it by {this.state.count}
  • 26. Events • Reactjs has the events that are attached with the components as the props of the components and can trigger methods.
  • 27. We have created a custom method clickCount and onClick of the button we are calling it onClick = {this.clickCount}
  • 28. Angular Backbone React Type MV* MVC V Technology HTML/CSS/JS/A ngular HTML/CSS/JS/b ackbone JSX Core MVC MVC Components View HTML HTML Virtual DOM Data Flowing 2 way binding - Unidirectional Creator Google - FB* & Instagram Architchure - - React Native & Flux SEO Support Phantom js - SEO friendly