SlideShare a Scribd company logo
1 of 23
Download to read offline
Introduction to React
A library for creating user interfaces.
โ— What is React?
โ— React Components
โ— Stateless UI
โ— Virtual DOM
Agenda
What is React?
โ— What is React?
โ— React Components
โ— Stateless UI
โ— Virtual DOM
Agenda
// commentBox.js.jsx
var CommentBox = React.createClass({displayName: 'CommentBox',
render: function() {
return (
<div className="commentBox">
Hello, world! I am a CommentBox.
</div>
);
}
});
React Component
Composable, Reusable Components
โ— Rethinking the way we build UIs on the web
โ— Build components, not templates
โ— Use React components to create cohesive building blocks and separate your
concerns
โ— Reduce coupling and increase cohesion
Composable, Reusable Components
โ— What is React?
โ— React Components
โ— Stateless UI
โ— Virtual DOM
Agenda
Stateless UI
Building UIs is hard because there is so much state.
Re-render, donโ€™t mutate.
โ— Data displayed is guaranteed to be up-to-date
โ— No two-way data-binding complexity
โ— No explicit DOM manipulations (components are declarative.)
Stateless UI
Virtual DOM
Re-render? But isnโ€™t DOM manipulation slow?
React knows to only update the changed parts.
Virtual DOM: A lightweight implementation of the DOM
โ— What React is
โ— Components, not templates
โ— Re-render, not mutate
โ— Virtual DOM
Summary
References / Additional Topics
React Tutorial (https://facebook.github.io/react/docs/tutorial.html)
Thinking in React (https://facebook.github.io/react/docs/thinking-in-react.html)
Reactive Programming
React Native
Flux
Reflux
Thanks!
Q&A

More Related Content

What's hot

Lesson 09
Lesson 09Lesson 09
Lesson 09
Gene Babon
ย 

What's hot (20)

Extending GWT
Extending GWTExtending GWT
Extending GWT
ย 
001. Introduction about React
001. Introduction about React001. Introduction about React
001. Introduction about React
ย 
Introduction to react js
Introduction to react jsIntroduction to react js
Introduction to react js
ย 
Reactjs workshop
Reactjs workshop Reactjs workshop
Reactjs workshop
ย 
Introduction to React JS
Introduction to React JSIntroduction to React JS
Introduction to React JS
ย 
Reactjs
Reactjs Reactjs
Reactjs
ย 
Lesson 09
Lesson 09Lesson 09
Lesson 09
ย 
React js
React jsReact js
React js
ย 
Its time to React.js
Its time to React.jsIts time to React.js
Its time to React.js
ย 
Starting with Reactjs
Starting with ReactjsStarting with Reactjs
Starting with Reactjs
ย 
React js Online Training
React js Online TrainingReact js Online Training
React js Online Training
ย 
Introduction to react
Introduction to reactIntroduction to react
Introduction to react
ย 
ReactJs
ReactJsReactJs
ReactJs
ย 
Internal workshop react-js-mruiz
Internal workshop react-js-mruizInternal workshop react-js-mruiz
Internal workshop react-js-mruiz
ย 
React.js
React.jsReact.js
React.js
ย 
React js Rahil Memon
React js Rahil MemonReact js Rahil Memon
React js Rahil Memon
ย 
React JS: A Secret Preview
React JS: A Secret PreviewReact JS: A Secret Preview
React JS: A Secret Preview
ย 
Introduction to ReactJs & fundamentals
Introduction to ReactJs & fundamentalsIntroduction to ReactJs & fundamentals
Introduction to ReactJs & fundamentals
ย 
20180518 QNAP Seminar - Introduction to React Native
20180518 QNAP Seminar - Introduction to React Native20180518 QNAP Seminar - Introduction to React Native
20180518 QNAP Seminar - Introduction to React Native
ย 
Improve WordPress load times with a CDN
Improve WordPress load times with a CDNImprove WordPress load times with a CDN
Improve WordPress load times with a CDN
ย 

Viewers also liked

Viewers also liked (20)

Intro to Web Map APIs
Intro to Web Map APIsIntro to Web Map APIs
Intro to Web Map APIs
ย 
Repaint & reflow
Repaint & reflowRepaint & reflow
Repaint & reflow
ย 
React entry
React entryReact entry
React entry
ย 
Synchronizing application state using Virtual DOM trees
Synchronizing application state using Virtual DOM treesSynchronizing application state using Virtual DOM trees
Synchronizing application state using Virtual DOM trees
ย 
Digitaalisesti vaikuttavaksi. @HelsinkiUniUX -projektin tarina
Digitaalisesti vaikuttavaksi. @HelsinkiUniUX  -projektin tarina Digitaalisesti vaikuttavaksi. @HelsinkiUniUX  -projektin tarina
Digitaalisesti vaikuttavaksi. @HelsinkiUniUX -projektin tarina
ย 
Introduction to React
Introduction to ReactIntroduction to React
Introduction to React
ย 
Why and How to Use Virtual DOM
Why and How to Use Virtual DOMWhy and How to Use Virtual DOM
Why and How to Use Virtual DOM
ย 
ReactNativeใ‚’่ชžใ‚‹ๅ‹‰ๅผทไผš
ReactNativeใ‚’่ชžใ‚‹ๅ‹‰ๅผทไผšReactNativeใ‚’่ชžใ‚‹ๅ‹‰ๅผทไผš
ReactNativeใ‚’่ชžใ‚‹ๅ‹‰ๅผทไผš
ย 
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
ReactReact
React
ย 
Pjax ๆทฑๅ…ฅๆทบๅ‡บ
Pjax ๆทฑๅ…ฅๆทบๅ‡บPjax ๆทฑๅ…ฅๆทบๅ‡บ
Pjax ๆทฑๅ…ฅๆทบๅ‡บ
ย 
From Back to Front: Rails To React Family
From Back to Front: Rails To React FamilyFrom Back to Front: Rails To React Family
From Back to Front: Rails To React Family
ย 
React Native - Workshop
React Native - WorkshopReact Native - Workshop
React Native - Workshop
ย 
React.js in real world apps.
React.js in real world apps. React.js in real world apps.
React.js in real world apps.
ย 
[@NaukriEngineering] Git Basic Commands and Hacks
[@NaukriEngineering] Git Basic Commands and Hacks[@NaukriEngineering] Git Basic Commands and Hacks
[@NaukriEngineering] Git Basic Commands and Hacks
ย 
An Introduction to ReactJS
An Introduction to ReactJSAn Introduction to ReactJS
An Introduction to ReactJS
ย 
ReactJS presentation
ReactJS presentationReactJS presentation
ReactJS presentation
ย 
Intro to react native
Intro to react nativeIntro to react native
Intro to react native
ย 
React - render() to DOM - Boris Dinkevich - Codemotion Milan 2016
React - render() to DOM - Boris Dinkevich - Codemotion Milan 2016React - render() to DOM - Boris Dinkevich - Codemotion Milan 2016
React - render() to DOM - Boris Dinkevich - Codemotion Milan 2016
ย 
DOM Features You Didnโ€™t Know Existed
DOM Features You Didnโ€™t Know ExistedDOM Features You Didnโ€™t Know Existed
DOM Features You Didnโ€™t Know Existed
ย 

Similar to Introduction to React

React.js - and how it changed our thinking about UI
React.js - and how it changed our thinking about UIReact.js - and how it changed our thinking about UI
React.js - and how it changed our thinking about UI
Marcin Grzywaczewski
ย 

Similar to Introduction to React (20)

Reactjs Introduction - Virtual DOM
Reactjs Introduction - Virtual DOMReactjs Introduction - Virtual DOM
Reactjs Introduction - Virtual DOM
ย 
React.js - and how it changed our thinking about UI
React.js - and how it changed our thinking about UIReact.js - and how it changed our thinking about UI
React.js - and how it changed our thinking about UI
ย 
Introduction to react native
Introduction to react nativeIntroduction to react native
Introduction to react native
ย 
Web summit.pptx
Web summit.pptxWeb summit.pptx
Web summit.pptx
ย 
FRU Kathmandu: Adopting with Change Frontend Architecture and Patterns
FRU Kathmandu: Adopting with Change Frontend Architecture and PatternsFRU Kathmandu: Adopting with Change Frontend Architecture and Patterns
FRU Kathmandu: Adopting with Change Frontend Architecture and Patterns
ย 
Introduction to Reactjs
Introduction to ReactjsIntroduction to Reactjs
Introduction to Reactjs
ย 
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 js TRAINING IN BANGALORE
React js TRAINING IN BANGALOREReact js TRAINING IN BANGALORE
React js TRAINING IN BANGALORE
ย 
React js TRAINING IN BANGALORE
React js TRAINING IN BANGALOREReact js TRAINING IN BANGALORE
React js TRAINING IN BANGALORE
ย 
React web development
React web developmentReact web development
React web development
ย 
React for non techies
React for non techiesReact for non techies
React for non techies
ย 
Web Development with Delphi and React - ITDevCon 2016
Web Development with Delphi and React - ITDevCon 2016Web Development with Delphi and React - ITDevCon 2016
Web Development with Delphi and React - ITDevCon 2016
ย 
Tech Talk on ReactJS
Tech Talk on ReactJSTech Talk on ReactJS
Tech Talk on ReactJS
ย 
React for Non Techies
React for Non TechiesReact for Non Techies
React for Non Techies
ย 
React for non techies
React for non techiesReact for non techies
React for non techies
ย 
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
ย 
The Road To Redux
The Road To ReduxThe Road To Redux
The Road To Redux
ย 
React.js vs node.js
React.js vs node.jsReact.js vs node.js
React.js vs node.js
ย 
Stripe con 2021 UI stack
Stripe con 2021 UI stackStripe con 2021 UI stack
Stripe con 2021 UI stack
ย 
"Crafting a Third-Party Banking Library with Web Components and React", Germa...
"Crafting a Third-Party Banking Library with Web Components and React", Germa..."Crafting a Third-Party Banking Library with Web Components and React", Germa...
"Crafting a Third-Party Banking Library with Web Components and React", Germa...
ย 

More from Yos Riady

More from Yos Riady (9)

Brief introduction to Serverless (2018)
Brief introduction to Serverless (2018)Brief introduction to Serverless (2018)
Brief introduction to Serverless (2018)
ย 
Type Checking in Javascript with Flow
Type Checking in Javascript with FlowType Checking in Javascript with Flow
Type Checking in Javascript with Flow
ย 
Schema-First API Design
Schema-First API DesignSchema-First API Design
Schema-First API Design
ย 
Writing Domain Specific Languages with JSON Schema
Writing Domain Specific Languages with JSON SchemaWriting Domain Specific Languages with JSON Schema
Writing Domain Specific Languages with JSON Schema
ย 
GraphQL in an Age of REST
GraphQL in an Age of RESTGraphQL in an Age of REST
GraphQL in an Age of REST
ย 
Python List Comprehensions
Python List ComprehensionsPython List Comprehensions
Python List Comprehensions
ย 
Ruby on Rails Workshop
Ruby on Rails WorkshopRuby on Rails Workshop
Ruby on Rails Workshop
ย 
Online Payments and You
Online Payments and YouOnline Payments and You
Online Payments and You
ย 
Entity Component Systems
Entity Component SystemsEntity Component Systems
Entity Component Systems
ย 

Recently uploaded

CHEAP Call Girls in Pushp Vihar (-DELHI )๐Ÿ” 9953056974๐Ÿ”(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )๐Ÿ” 9953056974๐Ÿ”(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )๐Ÿ” 9953056974๐Ÿ”(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )๐Ÿ” 9953056974๐Ÿ”(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
ย 
CALL ON โžฅ8923113531 ๐Ÿ”Call Girls Kakori Lucknow best sexual service Online โ˜‚๏ธ
CALL ON โžฅ8923113531 ๐Ÿ”Call Girls Kakori Lucknow best sexual service Online  โ˜‚๏ธCALL ON โžฅ8923113531 ๐Ÿ”Call Girls Kakori Lucknow best sexual service Online  โ˜‚๏ธ
CALL ON โžฅ8923113531 ๐Ÿ”Call Girls Kakori Lucknow best sexual service Online โ˜‚๏ธ
anilsa9823
ย 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
ย 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
ย 

Recently uploaded (20)

CHEAP Call Girls in Pushp Vihar (-DELHI )๐Ÿ” 9953056974๐Ÿ”(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )๐Ÿ” 9953056974๐Ÿ”(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )๐Ÿ” 9953056974๐Ÿ”(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )๐Ÿ” 9953056974๐Ÿ”(=)/CALL GIRLS SERVICE
ย 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
ย 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
ย 
CALL ON โžฅ8923113531 ๐Ÿ”Call Girls Kakori Lucknow best sexual service Online โ˜‚๏ธ
CALL ON โžฅ8923113531 ๐Ÿ”Call Girls Kakori Lucknow best sexual service Online  โ˜‚๏ธCALL ON โžฅ8923113531 ๐Ÿ”Call Girls Kakori Lucknow best sexual service Online  โ˜‚๏ธ
CALL ON โžฅ8923113531 ๐Ÿ”Call Girls Kakori Lucknow best sexual service Online โ˜‚๏ธ
ย 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
ย 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
ย 
Shapes for Sharing between Graph Data Spacesย - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spacesย - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spacesย - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spacesย - and Epistemic Querying of RDF-...
ย 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
ย 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
ย 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
ย 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
ย 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
ย 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
ย 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
ย 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
ย 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
ย 
Vip Call Girls Noida โžก๏ธ Delhi โžก๏ธ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida โžก๏ธ Delhi โžก๏ธ 9999965857 No Advance 24HRS LiveVip Call Girls Noida โžก๏ธ Delhi โžก๏ธ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida โžก๏ธ Delhi โžก๏ธ 9999965857 No Advance 24HRS Live
ย 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
ย 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
ย 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
ย 

Introduction to React

  • 1. Introduction to React A library for creating user interfaces.
  • 2. โ— What is React? โ— React Components โ— Stateless UI โ— Virtual DOM Agenda
  • 4.
  • 5.
  • 6.
  • 7. โ— What is React? โ— React Components โ— Stateless UI โ— Virtual DOM Agenda
  • 8. // commentBox.js.jsx var CommentBox = React.createClass({displayName: 'CommentBox', render: function() { return ( <div className="commentBox"> Hello, world! I am a CommentBox. </div> ); } });
  • 10. Composable, Reusable Components โ— Rethinking the way we build UIs on the web โ— Build components, not templates โ— Use React components to create cohesive building blocks and separate your concerns โ— Reduce coupling and increase cohesion
  • 11.
  • 12.
  • 14. โ— What is React? โ— React Components โ— Stateless UI โ— Virtual DOM Agenda
  • 16. Building UIs is hard because there is so much state. Re-render, donโ€™t mutate. โ— Data displayed is guaranteed to be up-to-date โ— No two-way data-binding complexity โ— No explicit DOM manipulations (components are declarative.) Stateless UI
  • 17.
  • 18.
  • 19. Virtual DOM Re-render? But isnโ€™t DOM manipulation slow? React knows to only update the changed parts. Virtual DOM: A lightweight implementation of the DOM
  • 20. โ— What React is โ— Components, not templates โ— Re-render, not mutate โ— Virtual DOM Summary
  • 21. References / Additional Topics React Tutorial (https://facebook.github.io/react/docs/tutorial.html) Thinking in React (https://facebook.github.io/react/docs/thinking-in-react.html) Reactive Programming React Native Flux Reflux
  • 23. Q&A