(Go: >> BACK << -|- >> HOME <<)

SlideShare a Scribd company logo
Neha Sharma - nehha255@gmail.com | twitter.com/hellonehha
What is React.js?
A JavaScript library for building user interfaces. Reactjs is
created by the Facebook for the V of MVC by reusable and
interactive UI components.
Who is using Reactjs?
• Facebook – Partial
• Instagram
• Khan Academy - Partial
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
• SEO Friendly - Components are client side as well as server side render hence they are SEO
friendly and no 3rd party plugin required
• Coding is simpler because of JSX
• Reactjs own debugger
• React Native is going to be next big thing
• Big minds are backing Reactjs
Core Concept of Reactjs
Unidirectional
Data Flow
ComponentsJSX
Virtual DOM
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
If you don’t want to use JSX, you can still work in react however the code would be like
the above as compare to the last slide without JSX
Components
In Reactjs the whole application is break into the
components. Components are interactive, reusable and
stageful too.
Line 9 : We are creating our component with name MyApp
Line 18 : We are calling/rendering our component in the content div on the HTML
page
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
Lets Start
• Download react
• Download JSX
• Install React debugger tool (Chrome)
Start your HTML Page
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.
Reactjs
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
React.render(<MyComponent name=“Neha” />) : name is the one of the props of
the component MyComponent . To access the value of the props in the react we
use {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}
Component Lifecycle
• componentWillMount – Client and server side
componenet Will Occur only once (before)
• componentDidMount – Only once (after)
• shouldComponentUpdate – Return value
determines weather component should update
• componentWillUnmount – Before unmounting
component
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}
Unidriectional Data Flow
• In reactjs, application data flows unidirectional via the state
and props not like angular js where we have 2-way data
binding. Which means in multiple component hierarchy , a
common parent component should manage the state and pass
it down the chain by props.
• setState - state should be updated by setState to ensure UI
will refresh/update
• this.props – to pass the value to the child components
Angular Backbone React
Type MV* MVC V
Technology HTML/CSS/JS/Ang
ular
HTML/CSS/JS/bac
kbone
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
google.com & Scotch.io
26
Thank you!
Please share your feedback @ nehha255@gmail.com
27

More Related Content

What's hot

Intro to React
Intro to ReactIntro to React
Intro to React
Justin Reock
 
React js
React jsReact js
React js
Rajesh Kolla
 
Introduction to React
Introduction to ReactIntroduction to React
Introduction to React
Rob Quick
 
React workshop
React workshopReact workshop
React workshop
Imran Sayed
 
Introduction to React JS
Introduction to React JSIntroduction to React JS
Introduction to React JS
Bethmi Gunasekara
 
ReactJS
ReactJSReactJS
An introduction to React.js
An introduction to React.jsAn introduction to React.js
An introduction to React.js
Emanuele DelBono
 
React JS: A Secret Preview
React JS: A Secret PreviewReact JS: A Secret Preview
React JS: A Secret Preview
valuebound
 
Introduction to ReactJS
Introduction to ReactJSIntroduction to ReactJS
Introduction to ReactJS
Knoldus Inc.
 
React workshop presentation
React workshop presentationReact workshop presentation
React workshop presentation
Bojan Golubović
 
Reactjs
ReactjsReactjs
WEB DEVELOPMENT USING REACT JS
 WEB DEVELOPMENT USING REACT JS WEB DEVELOPMENT USING REACT JS
WEB DEVELOPMENT USING REACT JS
MuthuKumaran Singaravelu
 
[Final] ReactJS presentation
[Final] ReactJS presentation[Final] ReactJS presentation
[Final] ReactJS presentation
洪 鹏发
 
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
namespaceit
 
React js
React jsReact js
React js
Jai Santhosh
 
Introduction to react_js
Introduction to react_jsIntroduction to react_js
Introduction to react_js
MicroPyramid .
 
Learn react-js
Learn react-jsLearn react-js
Introduction to React JS
Introduction to React JSIntroduction to React JS
Introduction to React JS
Arno Lordkronos
 
Introduction to react
Introduction to reactIntroduction to react
Introduction to react
kiranabburi
 
An Introduction to Redux
An Introduction to ReduxAn Introduction to Redux
An Introduction to Redux
NexThoughts Technologies
 

What's hot (20)

Intro to React
Intro to ReactIntro to React
Intro to React
 
React js
React jsReact js
React js
 
Introduction to React
Introduction to ReactIntroduction to React
Introduction to React
 
React workshop
React workshopReact workshop
React workshop
 
Introduction to React JS
Introduction to React JSIntroduction to React JS
Introduction to React JS
 
ReactJS
ReactJSReactJS
ReactJS
 
An introduction to React.js
An introduction to React.jsAn introduction to React.js
An introduction to React.js
 
React JS: A Secret Preview
React JS: A Secret PreviewReact JS: A Secret Preview
React JS: A Secret Preview
 
Introduction to ReactJS
Introduction to ReactJSIntroduction to ReactJS
Introduction to ReactJS
 
React workshop presentation
React workshop presentationReact workshop presentation
React workshop presentation
 
Reactjs
ReactjsReactjs
Reactjs
 
WEB DEVELOPMENT USING REACT JS
 WEB DEVELOPMENT USING REACT JS WEB DEVELOPMENT USING REACT JS
WEB DEVELOPMENT USING REACT JS
 
[Final] ReactJS presentation
[Final] ReactJS presentation[Final] ReactJS presentation
[Final] ReactJS presentation
 
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
 
React js
React jsReact js
React js
 
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
 
Introduction to React JS
Introduction to React JSIntroduction to React JS
Introduction to React JS
 
Introduction to react
Introduction to reactIntroduction to react
Introduction to react
 
An Introduction to Redux
An Introduction to ReduxAn Introduction to Redux
An Introduction to Redux
 

Similar to Reactjs

Getting started with react &amp; redux
Getting started with react &amp; reduxGetting started with react &amp; redux
Getting started with react &amp; redux
Girish Talekar
 
reactJS
reactJSreactJS
reactJS
Syam Santhosh
 
ReactJs
ReactJsReactJs
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...
Karmanjay Verma
 
React and Flux life cycle with JSX, React Router and Jest Unit Testing
React and  Flux life cycle with JSX, React Router and Jest Unit TestingReact and  Flux life cycle with JSX, React Router and Jest Unit Testing
React and Flux life cycle with JSX, React Router and Jest Unit Testing
Eswara Kumar Palakollu
 
Intro react js
Intro react jsIntro react js
Intro react js
Vijayakanth MP
 
Fundamental concepts of react js
Fundamental concepts of react jsFundamental concepts of react js
Fundamental concepts of react js
StephieJohn
 
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
 
React JS Interview Question & Answer
React JS Interview Question & AnswerReact JS Interview Question & Answer
React JS Interview Question & Answer
Mildain Solutions
 
Comparing Angular and React JS for SPAs
Comparing Angular and React JS for SPAsComparing Angular and React JS for SPAs
Comparing Angular and React JS for SPAs
Jennifer Estrada
 
React, Flux and more (p1)
React, Flux and more (p1)React, Flux and more (p1)
React, Flux and more (p1)
tuanpa206
 
React JS .NET
React JS .NETReact JS .NET
React JS .NET
Jennifer Estrada
 
Introduction to React JS.pptx
Introduction to React JS.pptxIntroduction to React JS.pptx
Introduction to React JS.pptx
SHAIKIRFAN715544
 
Tech Talk on ReactJS
Tech Talk on ReactJSTech Talk on ReactJS
Tech Talk on ReactJS
Atlogys Technical Consulting
 
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
 
React.js - The Dawn of Virtual DOM
React.js - The Dawn of Virtual DOMReact.js - The Dawn of Virtual DOM
React.js - The Dawn of Virtual DOM
Jimit Shah
 
React.js+Redux Workshops
React.js+Redux WorkshopsReact.js+Redux Workshops
React.js+Redux Workshops
Marcin Grzywaczewski
 
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
 
React - Start learning today
React - Start learning today React - Start learning today
React - Start learning today
Nitin Tyagi
 
React + Redux + TypeScript === ♥
React + Redux + TypeScript === ♥React + Redux + TypeScript === ♥
React + Redux + TypeScript === ♥
Remo Jansen
 

Similar to Reactjs (20)

Getting started with react &amp; redux
Getting started with react &amp; reduxGetting started with react &amp; redux
Getting started with react &amp; redux
 
reactJS
reactJSreactJS
reactJS
 
ReactJs
ReactJsReactJs
ReactJs
 
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...
 
React and Flux life cycle with JSX, React Router and Jest Unit Testing
React and  Flux life cycle with JSX, React Router and Jest Unit TestingReact and  Flux life cycle with JSX, React Router and Jest Unit Testing
React and Flux life cycle with JSX, React Router and Jest Unit Testing
 
Intro react js
Intro react jsIntro react js
Intro react js
 
Fundamental concepts of react js
Fundamental concepts of react jsFundamental concepts of react js
Fundamental concepts of react js
 
Presentation on "An Introduction to ReactJS"
Presentation on "An Introduction to ReactJS"Presentation on "An Introduction to ReactJS"
Presentation on "An Introduction to ReactJS"
 
React JS Interview Question & Answer
React JS Interview Question & AnswerReact JS Interview Question & Answer
React JS Interview Question & Answer
 
Comparing Angular and React JS for SPAs
Comparing Angular and React JS for SPAsComparing Angular and React JS for SPAs
Comparing Angular and React JS for SPAs
 
React, Flux and more (p1)
React, Flux and more (p1)React, Flux and more (p1)
React, Flux and more (p1)
 
React JS .NET
React JS .NETReact JS .NET
React JS .NET
 
Introduction to React JS.pptx
Introduction to React JS.pptxIntroduction to React JS.pptx
Introduction to React JS.pptx
 
Tech Talk on ReactJS
Tech Talk on ReactJSTech Talk on ReactJS
Tech Talk on 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
 
React.js - The Dawn of Virtual DOM
React.js - The Dawn of Virtual DOMReact.js - The Dawn of Virtual DOM
React.js - The Dawn of Virtual DOM
 
React.js+Redux Workshops
React.js+Redux WorkshopsReact.js+Redux Workshops
React.js+Redux Workshops
 
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 - Start learning today
React - Start learning today React - Start learning today
React - Start learning today
 
React + Redux + TypeScript === ♥
React + Redux + TypeScript === ♥React + Redux + TypeScript === ♥
React + Redux + TypeScript === ♥
 

More from Neha Sharma

Progressive web apps
 Progressive web apps Progressive web apps
Progressive web apps
Neha Sharma
 
Introduction to Service workers
Introduction to Service workersIntroduction to Service workers
Introduction to Service workers
Neha Sharma
 
Introduction to Webcomponents
Introduction to WebcomponentsIntroduction to Webcomponents
Introduction to Webcomponents
Neha Sharma
 
Post css - Getting start with PostCSS
Post css - Getting start with PostCSSPost css - Getting start with PostCSS
Post css - Getting start with PostCSS
Neha Sharma
 
CSS3 Flex Layout
CSS3 Flex LayoutCSS3 Flex Layout
CSS3 Flex Layout
Neha Sharma
 
SASS - Syntactically Awesome Stylesheet
SASS - Syntactically Awesome StylesheetSASS - Syntactically Awesome Stylesheet
SASS - Syntactically Awesome Stylesheet
Neha Sharma
 
Responsive Web design
Responsive Web designResponsive Web design
Responsive Web design
Neha Sharma
 
Introduction to HTML5
Introduction to HTML5Introduction to HTML5
Introduction to HTML5
Neha Sharma
 

More from Neha Sharma (8)

Progressive web apps
 Progressive web apps Progressive web apps
Progressive web apps
 
Introduction to Service workers
Introduction to Service workersIntroduction to Service workers
Introduction to Service workers
 
Introduction to Webcomponents
Introduction to WebcomponentsIntroduction to Webcomponents
Introduction to Webcomponents
 
Post css - Getting start with PostCSS
Post css - Getting start with PostCSSPost css - Getting start with PostCSS
Post css - Getting start with PostCSS
 
CSS3 Flex Layout
CSS3 Flex LayoutCSS3 Flex Layout
CSS3 Flex Layout
 
SASS - Syntactically Awesome Stylesheet
SASS - Syntactically Awesome StylesheetSASS - Syntactically Awesome Stylesheet
SASS - Syntactically Awesome Stylesheet
 
Responsive Web design
Responsive Web designResponsive Web design
Responsive Web design
 
Introduction to HTML5
Introduction to HTML5Introduction to HTML5
Introduction to HTML5
 

Recently uploaded

Mastering OnlyFans Clone App Development: Key Strategies for Success
Mastering OnlyFans Clone App Development: Key Strategies for SuccessMastering OnlyFans Clone App Development: Key Strategies for Success
Mastering OnlyFans Clone App Development: Key Strategies for Success
David Wilson
 
Choosing the Best Outlook OST to PST Converter: Key Features and Considerations
Choosing the Best Outlook OST to PST Converter: Key Features and ConsiderationsChoosing the Best Outlook OST to PST Converter: Key Features and Considerations
Choosing the Best Outlook OST to PST Converter: Key Features and Considerations
webbyacad software
 
Sonkoloniya documentation - ONEprojukti.pdf
Sonkoloniya documentation - ONEprojukti.pdfSonkoloniya documentation - ONEprojukti.pdf
Sonkoloniya documentation - ONEprojukti.pdf
SubhamMandal40
 
Types of Weaving loom machine & it's technology
Types of Weaving loom machine & it's technologyTypes of Weaving loom machine & it's technology
Types of Weaving loom machine & it's technology
ldtexsolbl
 
Camunda Chapter NY Meetup July 2024.pptx
Camunda Chapter NY Meetup July 2024.pptxCamunda Chapter NY Meetup July 2024.pptx
Camunda Chapter NY Meetup July 2024.pptx
ZachWylie3
 
Zaitechno Handheld Raman Spectrometer.pdf
Zaitechno Handheld Raman Spectrometer.pdfZaitechno Handheld Raman Spectrometer.pdf
Zaitechno Handheld Raman Spectrometer.pdf
AmandaCheung15
 
NVIDIA at Breakthrough Discuss for Space Exploration
NVIDIA at Breakthrough Discuss for Space ExplorationNVIDIA at Breakthrough Discuss for Space Exploration
NVIDIA at Breakthrough Discuss for Space Exploration
Alison B. Lowndes
 
Computer HARDWARE presenattion by CWD students class 10
Computer HARDWARE presenattion by CWD students class 10Computer HARDWARE presenattion by CWD students class 10
Computer HARDWARE presenattion by CWD students class 10
ankush9927
 
UX Webinar Series: Essentials for Adopting Passkeys as the Foundation of your...
UX Webinar Series: Essentials for Adopting Passkeys as the Foundation of your...UX Webinar Series: Essentials for Adopting Passkeys as the Foundation of your...
UX Webinar Series: Essentials for Adopting Passkeys as the Foundation of your...
FIDO Alliance
 
UX Webinar Series: Drive Revenue and Decrease Costs with Passkeys for Consume...
UX Webinar Series: Drive Revenue and Decrease Costs with Passkeys for Consume...UX Webinar Series: Drive Revenue and Decrease Costs with Passkeys for Consume...
UX Webinar Series: Drive Revenue and Decrease Costs with Passkeys for Consume...
FIDO Alliance
 
Accelerating Migrations = Recommendations
Accelerating Migrations = RecommendationsAccelerating Migrations = Recommendations
Accelerating Migrations = Recommendations
isBullShit
 
Russian Girls Call Navi Mumbai 🎈🔥9920725232 🔥💋🎈 Provide Best And Top Girl Ser...
Russian Girls Call Navi Mumbai 🎈🔥9920725232 🔥💋🎈 Provide Best And Top Girl Ser...Russian Girls Call Navi Mumbai 🎈🔥9920725232 🔥💋🎈 Provide Best And Top Girl Ser...
Russian Girls Call Navi Mumbai 🎈🔥9920725232 🔥💋🎈 Provide Best And Top Girl Ser...
bellared2
 
Communications Mining Series - Zero to Hero - Session 3
Communications Mining Series - Zero to Hero - Session 3Communications Mining Series - Zero to Hero - Session 3
Communications Mining Series - Zero to Hero - Session 3
DianaGray10
 
The History of Embeddings & Multimodal Embeddings
The History of Embeddings & Multimodal EmbeddingsThe History of Embeddings & Multimodal Embeddings
The History of Embeddings & Multimodal Embeddings
Zilliz
 
CheckPoint Firewall Presentation CCSA.pdf
CheckPoint Firewall Presentation CCSA.pdfCheckPoint Firewall Presentation CCSA.pdf
CheckPoint Firewall Presentation CCSA.pdf
ssuser137992
 
Uncharted Together- Navigating AI's New Frontiers in Libraries
Uncharted Together- Navigating AI's New Frontiers in LibrariesUncharted Together- Navigating AI's New Frontiers in Libraries
Uncharted Together- Navigating AI's New Frontiers in Libraries
Brian Pichman
 
Required Documents for ISO 17021 Certification.PPT
Required Documents for ISO 17021 Certification.PPTRequired Documents for ISO 17021 Certification.PPT
Required Documents for ISO 17021 Certification.PPT
mithun772
 
Redefining Cybersecurity with AI Capabilities
Redefining Cybersecurity with AI CapabilitiesRedefining Cybersecurity with AI Capabilities
Redefining Cybersecurity with AI Capabilities
Priyanka Aash
 
Discovery Series - Zero to Hero - Task Mining Session 1
Discovery Series - Zero to Hero - Task Mining Session 1Discovery Series - Zero to Hero - Task Mining Session 1
Discovery Series - Zero to Hero - Task Mining Session 1
DianaGray10
 
History and Introduction for Generative AI ( GenAI )
History and Introduction for Generative AI ( GenAI )History and Introduction for Generative AI ( GenAI )
History and Introduction for Generative AI ( GenAI )
Badri_Bady
 

Recently uploaded (20)

Mastering OnlyFans Clone App Development: Key Strategies for Success
Mastering OnlyFans Clone App Development: Key Strategies for SuccessMastering OnlyFans Clone App Development: Key Strategies for Success
Mastering OnlyFans Clone App Development: Key Strategies for Success
 
Choosing the Best Outlook OST to PST Converter: Key Features and Considerations
Choosing the Best Outlook OST to PST Converter: Key Features and ConsiderationsChoosing the Best Outlook OST to PST Converter: Key Features and Considerations
Choosing the Best Outlook OST to PST Converter: Key Features and Considerations
 
Sonkoloniya documentation - ONEprojukti.pdf
Sonkoloniya documentation - ONEprojukti.pdfSonkoloniya documentation - ONEprojukti.pdf
Sonkoloniya documentation - ONEprojukti.pdf
 
Types of Weaving loom machine & it's technology
Types of Weaving loom machine & it's technologyTypes of Weaving loom machine & it's technology
Types of Weaving loom machine & it's technology
 
Camunda Chapter NY Meetup July 2024.pptx
Camunda Chapter NY Meetup July 2024.pptxCamunda Chapter NY Meetup July 2024.pptx
Camunda Chapter NY Meetup July 2024.pptx
 
Zaitechno Handheld Raman Spectrometer.pdf
Zaitechno Handheld Raman Spectrometer.pdfZaitechno Handheld Raman Spectrometer.pdf
Zaitechno Handheld Raman Spectrometer.pdf
 
NVIDIA at Breakthrough Discuss for Space Exploration
NVIDIA at Breakthrough Discuss for Space ExplorationNVIDIA at Breakthrough Discuss for Space Exploration
NVIDIA at Breakthrough Discuss for Space Exploration
 
Computer HARDWARE presenattion by CWD students class 10
Computer HARDWARE presenattion by CWD students class 10Computer HARDWARE presenattion by CWD students class 10
Computer HARDWARE presenattion by CWD students class 10
 
UX Webinar Series: Essentials for Adopting Passkeys as the Foundation of your...
UX Webinar Series: Essentials for Adopting Passkeys as the Foundation of your...UX Webinar Series: Essentials for Adopting Passkeys as the Foundation of your...
UX Webinar Series: Essentials for Adopting Passkeys as the Foundation of your...
 
UX Webinar Series: Drive Revenue and Decrease Costs with Passkeys for Consume...
UX Webinar Series: Drive Revenue and Decrease Costs with Passkeys for Consume...UX Webinar Series: Drive Revenue and Decrease Costs with Passkeys for Consume...
UX Webinar Series: Drive Revenue and Decrease Costs with Passkeys for Consume...
 
Accelerating Migrations = Recommendations
Accelerating Migrations = RecommendationsAccelerating Migrations = Recommendations
Accelerating Migrations = Recommendations
 
Russian Girls Call Navi Mumbai 🎈🔥9920725232 🔥💋🎈 Provide Best And Top Girl Ser...
Russian Girls Call Navi Mumbai 🎈🔥9920725232 🔥💋🎈 Provide Best And Top Girl Ser...Russian Girls Call Navi Mumbai 🎈🔥9920725232 🔥💋🎈 Provide Best And Top Girl Ser...
Russian Girls Call Navi Mumbai 🎈🔥9920725232 🔥💋🎈 Provide Best And Top Girl Ser...
 
Communications Mining Series - Zero to Hero - Session 3
Communications Mining Series - Zero to Hero - Session 3Communications Mining Series - Zero to Hero - Session 3
Communications Mining Series - Zero to Hero - Session 3
 
The History of Embeddings & Multimodal Embeddings
The History of Embeddings & Multimodal EmbeddingsThe History of Embeddings & Multimodal Embeddings
The History of Embeddings & Multimodal Embeddings
 
CheckPoint Firewall Presentation CCSA.pdf
CheckPoint Firewall Presentation CCSA.pdfCheckPoint Firewall Presentation CCSA.pdf
CheckPoint Firewall Presentation CCSA.pdf
 
Uncharted Together- Navigating AI's New Frontiers in Libraries
Uncharted Together- Navigating AI's New Frontiers in LibrariesUncharted Together- Navigating AI's New Frontiers in Libraries
Uncharted Together- Navigating AI's New Frontiers in Libraries
 
Required Documents for ISO 17021 Certification.PPT
Required Documents for ISO 17021 Certification.PPTRequired Documents for ISO 17021 Certification.PPT
Required Documents for ISO 17021 Certification.PPT
 
Redefining Cybersecurity with AI Capabilities
Redefining Cybersecurity with AI CapabilitiesRedefining Cybersecurity with AI Capabilities
Redefining Cybersecurity with AI Capabilities
 
Discovery Series - Zero to Hero - Task Mining Session 1
Discovery Series - Zero to Hero - Task Mining Session 1Discovery Series - Zero to Hero - Task Mining Session 1
Discovery Series - Zero to Hero - Task Mining Session 1
 
History and Introduction for Generative AI ( GenAI )
History and Introduction for Generative AI ( GenAI )History and Introduction for Generative AI ( GenAI )
History and Introduction for Generative AI ( GenAI )
 

Reactjs

  • 1. Neha Sharma - nehha255@gmail.com | twitter.com/hellonehha
  • 2. What is React.js? A JavaScript library for building user interfaces. Reactjs is created by the Facebook for the V of MVC by reusable and interactive UI components.
  • 3. Who is using Reactjs? • Facebook – Partial • Instagram • Khan Academy - Partial
  • 4. 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 • SEO Friendly - Components are client side as well as server side render hence they are SEO friendly and no 3rd party plugin required • Coding is simpler because of JSX • Reactjs own debugger • React Native is going to be next big thing • Big minds are backing Reactjs
  • 5. Core Concept of Reactjs Unidirectional Data Flow ComponentsJSX Virtual DOM
  • 6. 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.
  • 7. 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
  • 8. If you don’t want to use JSX, you can still work in react however the code would be like the above as compare to the last slide without JSX
  • 9. Components In Reactjs the whole application is break into the components. Components are interactive, reusable and stageful too.
  • 10. Line 9 : We are creating our component with name MyApp Line 18 : We are calling/rendering our component in the content div on the HTML page
  • 11. 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
  • 12. 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
  • 13. Lets Start • Download react • Download JSX • Install React debugger tool (Chrome)
  • 15. 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.
  • 17. 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
  • 18. React.render(<MyComponent name=“Neha” />) : name is the one of the props of the component MyComponent . To access the value of the props in the react we use {this.props.name}.
  • 19. 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
  • 20. 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}
  • 21. Component Lifecycle • componentWillMount – Client and server side componenet Will Occur only once (before) • componentDidMount – Only once (after) • shouldComponentUpdate – Return value determines weather component should update • componentWillUnmount – Before unmounting component
  • 22. Events • Reactjs has the events that are attached with the components as the props of the components and can trigger methods.
  • 23. We have created a custom method clickCount and onClick of the button we are calling it onClick = {this.clickCount}
  • 24. Unidriectional Data Flow • In reactjs, application data flows unidirectional via the state and props not like angular js where we have 2-way data binding. Which means in multiple component hierarchy , a common parent component should manage the state and pass it down the chain by props. • setState - state should be updated by setState to ensure UI will refresh/update • this.props – to pass the value to the child components
  • 25. Angular Backbone React Type MV* MVC V Technology HTML/CSS/JS/Ang ular HTML/CSS/JS/bac kbone 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
  • 27. Thank you! Please share your feedback @ nehha255@gmail.com 27