SlideShare a Scribd company logo
1 of 13
Download to read offline
REACT
A JAVASCRIPT LIBRARY FOR BUILDING USER INTERFACES
- Introduction -
Presentation by Quangbuu Le <quangbuu@lozi.vn>
REACT
AsV in server-side MVC
REACT
AsV+C in client-side MVC
PHILOSOPHY
• DOM manipulation is expensive - not good	

• Simple - easy to contribute code	

• One-way reactive data-flow
COMPONENTS
• Write components, not
templates.	

• It’s reusable.	

• It’s high cohesion.
SPAGHETTI CODE? SAY NO
• Keep your component small.	

• It’s contain display logic only. No AJAX, no heavy
computing data in component.
HANDLE UI
• It’s hard because there is so much state.	

• Lots of UI elements, mutable DOM, user
input…	

• Data change over time is a root of all problems.
HOW COMPONENT WORKS?
• Render to Element with initialState before insert to DOM.	

• Component “react” when state change (on click, data
receive..).	

• Re-render the whole component, then diff with old virtual
DOM.	

• Apply the changed (attribute or DOM Node) to real
DOM.
• Re-render the whole component to make sure
that every place data is display correctly and to
be up-to-date.	

• Re-render make things simple: no magical data
binding, no model dirty checking, no explicit
DOM operations…	

• Is re-rendering expensive? No, thank to virtual
DOM.
VIRTUAL DOM
• Make re-rendering fast.	

• Re-rendering make new virtual DOM, then diff
with old virtual DOM to find changed.	

• Apply only changed to the real DOM.
It’s fast because real DOM is slow.
It’s powerful because every single component has own
power.
Thanks for listening
-The end -

More Related Content

What's hot

What is Mean Stack Development ?
What is Mean Stack Development ?What is Mean Stack Development ?
What is Mean Stack Development ?Balajihope
 
Introduction to React, Flux, and Isomorphic Apps
Introduction to React, Flux, and Isomorphic AppsIntroduction to React, Flux, and Isomorphic Apps
Introduction to React, Flux, and Isomorphic AppsFederico Torre
 
Owning Web Performance with PhantomJS 2 - Fluent 2016
Owning Web Performance with PhantomJS 2 - Fluent 2016Owning Web Performance with PhantomJS 2 - Fluent 2016
Owning Web Performance with PhantomJS 2 - Fluent 2016Wesley Hales
 
Advanced web application architecture - Talk
Advanced web application architecture - TalkAdvanced web application architecture - Talk
Advanced web application architecture - TalkMatthias Noback
 
Advance java session 2
Advance java session 2Advance java session 2
Advance java session 2Smita B Kumar
 
Ui path training-course-content
Ui path training-course-contentUi path training-course-content
Ui path training-course-contentTraining Institute
 
Azkaban-en
Azkaban-enAzkaban-en
Azkaban-enwyukawa
 
NoSQL Database in .NET Apps
NoSQL Database in .NET AppsNoSQL Database in .NET Apps
NoSQL Database in .NET AppsShiju Varghese
 
Asynchronous javascript
 Asynchronous javascript Asynchronous javascript
Asynchronous javascriptEman Mohamed
 
Ajax Technology
Ajax TechnologyAjax Technology
Ajax TechnologyZia_Rehman
 
SOA with PHP and Symfony
SOA with PHP and SymfonySOA with PHP and Symfony
SOA with PHP and SymfonyMichalSchroeder
 
Next generation testing
Next generation testingNext generation testing
Next generation testingStephen Erdman
 
LAMP is so yesterday, MEAN is so tomorrow! :)
LAMP is so yesterday, MEAN is so tomorrow! :) LAMP is so yesterday, MEAN is so tomorrow! :)
LAMP is so yesterday, MEAN is so tomorrow! :) Sascha Sambale
 
Nginx caching
Nginx cachingNginx caching
Nginx cachingreneedv
 
Thin client SPAs? Stream UI using web standards (CodeNight)
Thin client SPAs? Stream UI using web standards (CodeNight)Thin client SPAs? Stream UI using web standards (CodeNight)
Thin client SPAs? Stream UI using web standards (CodeNight)Starcounter
 

What's hot (20)

MEAN Stack
MEAN StackMEAN Stack
MEAN Stack
 
What is Mean Stack Development ?
What is Mean Stack Development ?What is Mean Stack Development ?
What is Mean Stack Development ?
 
Introduction to React, Flux, and Isomorphic Apps
Introduction to React, Flux, and Isomorphic AppsIntroduction to React, Flux, and Isomorphic Apps
Introduction to React, Flux, and Isomorphic Apps
 
Owning Web Performance with PhantomJS 2 - Fluent 2016
Owning Web Performance with PhantomJS 2 - Fluent 2016Owning Web Performance with PhantomJS 2 - Fluent 2016
Owning Web Performance with PhantomJS 2 - Fluent 2016
 
Advanced web application architecture - Talk
Advanced web application architecture - TalkAdvanced web application architecture - Talk
Advanced web application architecture - Talk
 
Advance java session 2
Advance java session 2Advance java session 2
Advance java session 2
 
Ui path training-course-content
Ui path training-course-contentUi path training-course-content
Ui path training-course-content
 
Azkaban-en
Azkaban-enAzkaban-en
Azkaban-en
 
SBT Made Simple
SBT Made SimpleSBT Made Simple
SBT Made Simple
 
NoSQL Database in .NET Apps
NoSQL Database in .NET AppsNoSQL Database in .NET Apps
NoSQL Database in .NET Apps
 
Asynchronous javascript
 Asynchronous javascript Asynchronous javascript
Asynchronous javascript
 
Ajax
AjaxAjax
Ajax
 
JEE session 1
JEE session 1JEE session 1
JEE session 1
 
Ajax Technology
Ajax TechnologyAjax Technology
Ajax Technology
 
SOA with PHP and Symfony
SOA with PHP and SymfonySOA with PHP and Symfony
SOA with PHP and Symfony
 
Next generation testing
Next generation testingNext generation testing
Next generation testing
 
LAMP is so yesterday, MEAN is so tomorrow! :)
LAMP is so yesterday, MEAN is so tomorrow! :) LAMP is so yesterday, MEAN is so tomorrow! :)
LAMP is so yesterday, MEAN is so tomorrow! :)
 
Nginx caching
Nginx cachingNginx caching
Nginx caching
 
Thin client SPAs? Stream UI using web standards (CodeNight)
Thin client SPAs? Stream UI using web standards (CodeNight)Thin client SPAs? Stream UI using web standards (CodeNight)
Thin client SPAs? Stream UI using web standards (CodeNight)
 
ReactJS Code Impact
ReactJS Code ImpactReactJS Code Impact
ReactJS Code Impact
 

Viewers also liked

Process coordinator in NUMA environment
Process coordinator in NUMA environmentProcess coordinator in NUMA environment
Process coordinator in NUMA environmentChiyoung Song
 
Limits to progressivism 6
Limits to progressivism 6Limits to progressivism 6
Limits to progressivism 6happyparrot
 
Limits to progressivism 6
Limits to progressivism 6Limits to progressivism 6
Limits to progressivism 6happyparrot
 
Boost Your Career as a Volunteer
Boost Your Career as a VolunteerBoost Your Career as a Volunteer
Boost Your Career as a VolunteerSarah Dalton
 
Stermedia profile
Stermedia profileStermedia profile
Stermedia profilestermedia
 
Usa in wwi 4 (6)
Usa in wwi 4 (6)Usa in wwi 4 (6)
Usa in wwi 4 (6)happyparrot
 
Primp Your Profile - Recruiter Edition
Primp Your Profile - Recruiter EditionPrimp Your Profile - Recruiter Edition
Primp Your Profile - Recruiter EditionSarah Dalton
 
Theodore roosevelt 4
Theodore roosevelt 4Theodore roosevelt 4
Theodore roosevelt 4happyparrot
 
World war i 1 (1)
World war i 1 (1)World war i 1 (1)
World war i 1 (1)happyparrot
 
HPSA Presentation for BOD Meeting 11-2014
HPSA Presentation for BOD Meeting 11-2014HPSA Presentation for BOD Meeting 11-2014
HPSA Presentation for BOD Meeting 11-2014Ginger Pierce
 
Baby Jesus Song
Baby Jesus SongBaby Jesus Song
Baby Jesus Songseemrschia
 
Code Like Pythonista
Code Like PythonistaCode Like Pythonista
Code Like PythonistaChiyoung Song
 

Viewers also liked (13)

Process coordinator in NUMA environment
Process coordinator in NUMA environmentProcess coordinator in NUMA environment
Process coordinator in NUMA environment
 
Limits to progressivism 6
Limits to progressivism 6Limits to progressivism 6
Limits to progressivism 6
 
Limits to progressivism 6
Limits to progressivism 6Limits to progressivism 6
Limits to progressivism 6
 
Boost Your Career as a Volunteer
Boost Your Career as a VolunteerBoost Your Career as a Volunteer
Boost Your Career as a Volunteer
 
Stermedia profile
Stermedia profileStermedia profile
Stermedia profile
 
DrDoS
DrDoSDrDoS
DrDoS
 
Usa in wwi 4 (6)
Usa in wwi 4 (6)Usa in wwi 4 (6)
Usa in wwi 4 (6)
 
Primp Your Profile - Recruiter Edition
Primp Your Profile - Recruiter EditionPrimp Your Profile - Recruiter Edition
Primp Your Profile - Recruiter Edition
 
Theodore roosevelt 4
Theodore roosevelt 4Theodore roosevelt 4
Theodore roosevelt 4
 
World war i 1 (1)
World war i 1 (1)World war i 1 (1)
World war i 1 (1)
 
HPSA Presentation for BOD Meeting 11-2014
HPSA Presentation for BOD Meeting 11-2014HPSA Presentation for BOD Meeting 11-2014
HPSA Presentation for BOD Meeting 11-2014
 
Baby Jesus Song
Baby Jesus SongBaby Jesus Song
Baby Jesus Song
 
Code Like Pythonista
Code Like PythonistaCode Like Pythonista
Code Like Pythonista
 

Similar to React Introduction

Дмитрий Тежельников «Разработка вэб-решений с использованием Asp.NET.Core и ...
Дмитрий Тежельников  «Разработка вэб-решений с использованием Asp.NET.Core и ...Дмитрий Тежельников  «Разработка вэб-решений с использованием Asp.NET.Core и ...
Дмитрий Тежельников «Разработка вэб-решений с использованием Asp.NET.Core и ...MskDotNet Community
 
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 UIMarcin Grzywaczewski
 
R2DBC - Good Enough for Production?
R2DBC - Good Enough for Production?R2DBC - Good Enough for Production?
R2DBC - Good Enough for Production?Olexandra Dmytrenko
 
Getting started with react &amp; redux
Getting started with react &amp; reduxGetting started with react &amp; redux
Getting started with react &amp; reduxGirish Talekar
 
React js TRAINING IN BANGALORE
React js TRAINING IN BANGALOREReact js TRAINING IN BANGALORE
React js TRAINING IN BANGALOREnearlearn
 
React js TRAINING IN BANGALORE
React js TRAINING IN BANGALOREReact js TRAINING IN BANGALORE
React js TRAINING IN BANGALOREnearlearn
 
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 2016Marco Breveglieri
 
Module Architecture of React-Redux Applications
Module Architecture of React-Redux ApplicationsModule Architecture of React-Redux Applications
Module Architecture of React-Redux ApplicationsAndrii Sliusar
 
Introduction to react native with redux
Introduction to react native with reduxIntroduction to react native with redux
Introduction to react native with reduxMike Melusky
 
How and why we evolved a legacy Java web application to Scala... and we are s...
How and why we evolved a legacy Java web application to Scala... and we are s...How and why we evolved a legacy Java web application to Scala... and we are s...
How and why we evolved a legacy Java web application to Scala... and we are s...Katia Aresti
 
Learning React - I
Learning React - ILearning React - I
Learning React - IMitch Chen
 
IBM and Node.js - Old Doge, New Tricks
IBM and Node.js - Old Doge, New TricksIBM and Node.js - Old Doge, New Tricks
IBM and Node.js - Old Doge, New TricksDejan Glozic
 
Puppet – Make stateful apps easier than stateless
Puppet – Make stateful apps easier than statelessPuppet – Make stateful apps easier than stateless
Puppet – Make stateful apps easier than statelessStarcounter
 
React gsg presentation with ryan jung &amp; elias malik
React   gsg presentation with ryan jung &amp; elias malikReact   gsg presentation with ryan jung &amp; elias malik
React gsg presentation with ryan jung &amp; elias malikLama K Banna
 
Welcome to React & Flux !
Welcome to React & Flux !Welcome to React & Flux !
Welcome to React & Flux !Ritesh Kumar
 

Similar to React Introduction (20)

Meteor + React
Meteor + ReactMeteor + React
Meteor + React
 
Дмитрий Тежельников «Разработка вэб-решений с использованием Asp.NET.Core и ...
Дмитрий Тежельников  «Разработка вэб-решений с использованием Asp.NET.Core и ...Дмитрий Тежельников  «Разработка вэб-решений с использованием Asp.NET.Core и ...
Дмитрий Тежельников «Разработка вэб-решений с использованием Asp.NET.Core и ...
 
React Tech Salon
React Tech SalonReact Tech Salon
React Tech Salon
 
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
 
React.js at Cortex
React.js at CortexReact.js at Cortex
React.js at Cortex
 
R2DBC - Good Enough for Production?
R2DBC - Good Enough for Production?R2DBC - Good Enough for Production?
R2DBC - Good Enough for Production?
 
React js
React jsReact js
React js
 
Getting started with react &amp; redux
Getting started with react &amp; reduxGetting started with react &amp; redux
Getting started with react &amp; redux
 
Tech Talk on ReactJS
Tech Talk on ReactJSTech Talk on ReactJS
Tech Talk on ReactJS
 
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
 
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
 
Module Architecture of React-Redux Applications
Module Architecture of React-Redux ApplicationsModule Architecture of React-Redux Applications
Module Architecture of React-Redux Applications
 
Introduction to react native with redux
Introduction to react native with reduxIntroduction to react native with redux
Introduction to react native with redux
 
How and why we evolved a legacy Java web application to Scala... and we are s...
How and why we evolved a legacy Java web application to Scala... and we are s...How and why we evolved a legacy Java web application to Scala... and we are s...
How and why we evolved a legacy Java web application to Scala... and we are s...
 
Learning React - I
Learning React - ILearning React - I
Learning React - I
 
IBM and Node.js - Old Doge, New Tricks
IBM and Node.js - Old Doge, New TricksIBM and Node.js - Old Doge, New Tricks
IBM and Node.js - Old Doge, New Tricks
 
Puppet – Make stateful apps easier than stateless
Puppet – Make stateful apps easier than statelessPuppet – Make stateful apps easier than stateless
Puppet – Make stateful apps easier than stateless
 
React gsg presentation with ryan jung &amp; elias malik
React   gsg presentation with ryan jung &amp; elias malikReact   gsg presentation with ryan jung &amp; elias malik
React gsg presentation with ryan jung &amp; elias malik
 
Welcome to React & Flux !
Welcome to React & Flux !Welcome to React & Flux !
Welcome to React & Flux !
 

Recently uploaded

Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 

Recently uploaded (20)

Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 

React Introduction

  • 1. REACT A JAVASCRIPT LIBRARY FOR BUILDING USER INTERFACES - Introduction - Presentation by Quangbuu Le <quangbuu@lozi.vn>
  • 4. PHILOSOPHY • DOM manipulation is expensive - not good • Simple - easy to contribute code • One-way reactive data-flow
  • 5. COMPONENTS • Write components, not templates. • It’s reusable. • It’s high cohesion.
  • 6. SPAGHETTI CODE? SAY NO • Keep your component small. • It’s contain display logic only. No AJAX, no heavy computing data in component.
  • 7. HANDLE UI • It’s hard because there is so much state. • Lots of UI elements, mutable DOM, user input… • Data change over time is a root of all problems.
  • 8. HOW COMPONENT WORKS? • Render to Element with initialState before insert to DOM. • Component “react” when state change (on click, data receive..). • Re-render the whole component, then diff with old virtual DOM. • Apply the changed (attribute or DOM Node) to real DOM.
  • 9. • Re-render the whole component to make sure that every place data is display correctly and to be up-to-date. • Re-render make things simple: no magical data binding, no model dirty checking, no explicit DOM operations… • Is re-rendering expensive? No, thank to virtual DOM.
  • 10. VIRTUAL DOM • Make re-rendering fast. • Re-rendering make new virtual DOM, then diff with old virtual DOM to find changed. • Apply only changed to the real DOM.
  • 11. It’s fast because real DOM is slow.
  • 12. It’s powerful because every single component has own power.