SlideShare uma empresa Scribd logo
1 de 26
18.08.2016
Fatih Şimşek - Software Infrastructure
React
React
Open source Javascript Library
Created by Jordan Walke, a software engineer at Facebook
First deployed on Facebook’s newsfeed in 2011
Maintained by Facebook, Instagram and a community of
individual developers and corporations
Who is using React?
9flats - Airbnb - Alipay - Atlassian - BBC - Box - Capital One -
Coursera -Dailymotion - Deezer - Docker - Expedia - Facebook -
Fotocasa - HappyFresh - IMDb - Instacart - Instagram - Khan
Academy - Klarna - Lyft - NBC - Netflix - NFL - Paypal - Periscope -
Ralph Lauren - Reddit – Salesforce - Sberbank - Stack Overflow -
Tesla - Tmall - The New York Times - Twitter Fabric - Twitter
Mobile - Uber - WhatsApp - Wired - Yahoo - Zendesk
https://github.com/facebook/react/wiki/Sites-Using-React
Github
React
Creating user interface(V in MVC model)
Speed
Declarative
Composable
Learn Once, Write Anywhere
Support ES6
Testable
Write once, Run Everywhere
React
Architecture
Architecture
Component manage own state
One way binding
JSX
Virtual DOM
Component Lifecycle
JSX
Supports xml-like syntax inline in JavaScript
Each element is transformed into a Javascript function call
• <Hello /> => Hello(null)
• <div /> => React.DOM.div(null)
Virtual DOM
Problem:
• DOM manipulation is expensive
• Touching DOM is hard to test
• Re-render all parts of DOM make your app slowly
Virtual DOM
Solution:
When the component’s state is changed, React
• Use different algorithm with the browser DOM tree to
identify the changes
• Instead of creating new object, React just identify what
change is took place and once identify update that state
• Render the subtree of DOM elements into the rendering of
the DOM
Virtual DOM
DEMO
Prop / State
Prop:
• Used to pass parameter from parent to children
• PropTypes used to validate properties
• getDefaultProps
State:
• Used to manage state inside component
• getInitialState
• setState
Prop / State
Mixins / Statics
Mixins:
• Different components may share some common functionality
• Several mixins can be defined
• Methods defined on mixins run in the order mixins were
listed
Statics:
• Like .Net / Java static method
• Define static methods in statics block of component
Events
componentWillMount: Invoked once before the initial render
componentDidMount: Invoked once, only on the client
componentWillReceiveProps: Invoked when a component is receiving new props
shouldComponentUpdate: Invoked before rendering when new props or state are
being received
componentWillUpdate: Invoked immediately before rendering when new props or
state are being received
componentDidUpdate: Invoked immediately after the component's updates are
flushed to the DOM
componentWillUnmount: Invoked immediately before a component is
unmounted from the DOM
Initial Phase
Lifecycle
Update Phase
DEMO
Flux
Action: Helper method that facilitate passing data
to the Dispatcher
Dispatcher: Receive action and broadcast
payload to registered callback
Store: Containers for application state & logic that
have callbacks registered to the dispatcher
View: State from Stores and pass it down via props
to child components
Flux
Redux
• Single source of truth
• State is read-only
• Mutations are written
as pure functions
(reducers)
Redux
• Important difference to Flux: no dispatching inside the action
• There is no Dispatcher at all; pure functions do not need to
be managed, they need to be composed
• Mutations are written as pure functions
Benchmark
React Library Overview

Mais conteúdo relacionado

Mais procurados

Calling APIs with SharePoint Framework
Calling APIs with SharePoint FrameworkCalling APIs with SharePoint Framework
Calling APIs with SharePoint FrameworkGiuseppe Marchi
 
DevOps and Continuous Delivery reference architectures for Docker
DevOps and Continuous Delivery reference architectures for DockerDevOps and Continuous Delivery reference architectures for Docker
DevOps and Continuous Delivery reference architectures for DockerSonatype
 
Building a PWA with Ionic, Angular, and Spring Boot - GeeCON 2017
Building a PWA with Ionic, Angular, and Spring Boot - GeeCON 2017Building a PWA with Ionic, Angular, and Spring Boot - GeeCON 2017
Building a PWA with Ionic, Angular, and Spring Boot - GeeCON 2017Matt Raible
 
Lo mejor y peor de React Native @ValenciaJS
Lo mejor y peor de React Native @ValenciaJSLo mejor y peor de React Native @ValenciaJS
Lo mejor y peor de React Native @ValenciaJSMarcel Kalveram
 
Git workflow
Git workflowGit workflow
Git workflowArif Huda
 
React Native in a nutshell
React Native in a nutshellReact Native in a nutshell
React Native in a nutshellBrainhub
 
React Native for multi-platform mobile applications - Matteo Manchi - Codemo...
React Native for multi-platform mobile applications  - Matteo Manchi - Codemo...React Native for multi-platform mobile applications  - Matteo Manchi - Codemo...
React Native for multi-platform mobile applications - Matteo Manchi - Codemo...Codemotion
 
Midwest PHP 2017 DevOps For Small team
Midwest PHP 2017 DevOps For Small teamMidwest PHP 2017 DevOps For Small team
Midwest PHP 2017 DevOps For Small teamJoe Ferguson
 
Put an end to regression with codeception testing
Put an end to regression with codeception testingPut an end to regression with codeception testing
Put an end to regression with codeception testingJoe Ferguson
 
Composer at Scale, Release and Dependency Management
Composer at Scale, Release and Dependency ManagementComposer at Scale, Release and Dependency Management
Composer at Scale, Release and Dependency ManagementJoe Ferguson
 
Testing on Mobile Devices with Location Services
Testing on Mobile Devices with Location ServicesTesting on Mobile Devices with Location Services
Testing on Mobile Devices with Location ServicesSauce Labs
 
warblecamp - twical
warblecamp - twical warblecamp - twical
warblecamp - twical Angus Fox
 
React native - React(ive) Way To Build Native Mobile Apps
React native - React(ive) Way To Build Native Mobile AppsReact native - React(ive) Way To Build Native Mobile Apps
React native - React(ive) Way To Build Native Mobile AppsJimit Shah
 
When to (use / not use) React Native.
When to (use / not use) React Native.When to (use / not use) React Native.
When to (use / not use) React Native.Bobby Schultz
 
Appcelerator Titanium Intro (2014)
Appcelerator Titanium Intro (2014)Appcelerator Titanium Intro (2014)
Appcelerator Titanium Intro (2014)Nicholas Jansma
 
Appcelerator Titanium Intro
Appcelerator Titanium IntroAppcelerator Titanium Intro
Appcelerator Titanium IntroNicholas Jansma
 
Automating Hybrid Applications with Appium
Automating Hybrid Applications with AppiumAutomating Hybrid Applications with Appium
Automating Hybrid Applications with AppiumSauce Labs
 

Mais procurados (20)

Succeeding with FOSS!
Succeeding with FOSS!Succeeding with FOSS!
Succeeding with FOSS!
 
Calling APIs with SharePoint Framework
Calling APIs with SharePoint FrameworkCalling APIs with SharePoint Framework
Calling APIs with SharePoint Framework
 
DevOps and Continuous Delivery reference architectures for Docker
DevOps and Continuous Delivery reference architectures for DockerDevOps and Continuous Delivery reference architectures for Docker
DevOps and Continuous Delivery reference architectures for Docker
 
Building a PWA with Ionic, Angular, and Spring Boot - GeeCON 2017
Building a PWA with Ionic, Angular, and Spring Boot - GeeCON 2017Building a PWA with Ionic, Angular, and Spring Boot - GeeCON 2017
Building a PWA with Ionic, Angular, and Spring Boot - GeeCON 2017
 
Lo mejor y peor de React Native @ValenciaJS
Lo mejor y peor de React Native @ValenciaJSLo mejor y peor de React Native @ValenciaJS
Lo mejor y peor de React Native @ValenciaJS
 
Git workflow
Git workflowGit workflow
Git workflow
 
React Native in a nutshell
React Native in a nutshellReact Native in a nutshell
React Native in a nutshell
 
React Native for multi-platform mobile applications - Matteo Manchi - Codemo...
React Native for multi-platform mobile applications  - Matteo Manchi - Codemo...React Native for multi-platform mobile applications  - Matteo Manchi - Codemo...
React Native for multi-platform mobile applications - Matteo Manchi - Codemo...
 
Midwest PHP 2017 DevOps For Small team
Midwest PHP 2017 DevOps For Small teamMidwest PHP 2017 DevOps For Small team
Midwest PHP 2017 DevOps For Small team
 
Put an end to regression with codeception testing
Put an end to regression with codeception testingPut an end to regression with codeception testing
Put an end to regression with codeception testing
 
Composer at Scale, Release and Dependency Management
Composer at Scale, Release and Dependency ManagementComposer at Scale, Release and Dependency Management
Composer at Scale, Release and Dependency Management
 
Testing on Mobile Devices with Location Services
Testing on Mobile Devices with Location ServicesTesting on Mobile Devices with Location Services
Testing on Mobile Devices with Location Services
 
warblecamp - twical
warblecamp - twical warblecamp - twical
warblecamp - twical
 
React native - React(ive) Way To Build Native Mobile Apps
React native - React(ive) Way To Build Native Mobile AppsReact native - React(ive) Way To Build Native Mobile Apps
React native - React(ive) Way To Build Native Mobile Apps
 
When to (use / not use) React Native.
When to (use / not use) React Native.When to (use / not use) React Native.
When to (use / not use) React Native.
 
Appcelerator Titanium Intro (2014)
Appcelerator Titanium Intro (2014)Appcelerator Titanium Intro (2014)
Appcelerator Titanium Intro (2014)
 
Android Studio vs. ADT
Android Studio vs. ADTAndroid Studio vs. ADT
Android Studio vs. ADT
 
Lezione 03 Introduzione a react
Lezione 03   Introduzione a reactLezione 03   Introduzione a react
Lezione 03 Introduzione a react
 
Appcelerator Titanium Intro
Appcelerator Titanium IntroAppcelerator Titanium Intro
Appcelerator Titanium Intro
 
Automating Hybrid Applications with Appium
Automating Hybrid Applications with AppiumAutomating Hybrid Applications with Appium
Automating Hybrid Applications with Appium
 

Destaque

Tabella maschile record distensione su panca - Regione Puglia
Tabella maschile record distensione su panca - Regione PugliaTabella maschile record distensione su panca - Regione Puglia
Tabella maschile record distensione su panca - Regione Pugliagreanri
 
Casamiento de cleopatra(2)
Casamiento de cleopatra(2)Casamiento de cleopatra(2)
Casamiento de cleopatra(2)Nicol Neumann
 
Agenda Primera Sesión Formación ABC en Uribia Guajira
Agenda Primera Sesión Formación ABC en Uribia GuajiraAgenda Primera Sesión Formación ABC en Uribia Guajira
Agenda Primera Sesión Formación ABC en Uribia Guajiralesbia0808
 
Wowecoin comp profile
Wowecoin comp profileWowecoin comp profile
Wowecoin comp profileWOWCOIN
 
Tabella maschile record distensione su panca
Tabella maschile record distensione su pancaTabella maschile record distensione su panca
Tabella maschile record distensione su pancagreanri
 
Огляд нових надходжень до шкільної бібліотеки Золотоніської ЗОШ №3
Огляд нових надходжень до шкільної бібліотеки Золотоніської ЗОШ №3Огляд нових надходжень до шкільної бібліотеки Золотоніської ЗОШ №3
Огляд нових надходжень до шкільної бібліотеки Золотоніської ЗОШ №3Галина Сызько
 
Презентація опорного закладу з БЖ та ОЗ
Презентація опорного закладу з БЖ та ОЗ Презентація опорного закладу з БЖ та ОЗ
Презентація опорного закладу з БЖ та ОЗ Андрій Лубенець
 
Realm.io for iOS
Realm.io for iOSRealm.io for iOS
Realm.io for iOSEunjoo Im
 
РИФ 2016, Как сделать клиента счастливее и повысить фин. результаты. Опыт сер...
РИФ 2016, Как сделать клиента счастливее и повысить фин. результаты. Опыт сер...РИФ 2016, Как сделать клиента счастливее и повысить фин. результаты. Опыт сер...
РИФ 2016, Как сделать клиента счастливее и повысить фин. результаты. Опыт сер...Тарасов Константин
 
CocoaHeads Lyon 17/12/2011 : Arc
CocoaHeads Lyon 17/12/2011 : ArcCocoaHeads Lyon 17/12/2011 : Arc
CocoaHeads Lyon 17/12/2011 : ArcCocoaHeads Lyon
 

Destaque (14)

Node js
Node jsNode js
Node js
 
Tabella maschile record distensione su panca - Regione Puglia
Tabella maschile record distensione su panca - Regione PugliaTabella maschile record distensione su panca - Regione Puglia
Tabella maschile record distensione su panca - Regione Puglia
 
Casamiento de cleopatra(2)
Casamiento de cleopatra(2)Casamiento de cleopatra(2)
Casamiento de cleopatra(2)
 
Agenda Primera Sesión Formación ABC en Uribia Guajira
Agenda Primera Sesión Formación ABC en Uribia GuajiraAgenda Primera Sesión Formación ABC en Uribia Guajira
Agenda Primera Sesión Formación ABC en Uribia Guajira
 
Wowecoin comp profile
Wowecoin comp profileWowecoin comp profile
Wowecoin comp profile
 
Tabella maschile record distensione su panca
Tabella maschile record distensione su pancaTabella maschile record distensione su panca
Tabella maschile record distensione su panca
 
Огляд нових надходжень до шкільної бібліотеки Золотоніської ЗОШ №3
Огляд нових надходжень до шкільної бібліотеки Золотоніської ЗОШ №3Огляд нових надходжень до шкільної бібліотеки Золотоніської ЗОШ №3
Огляд нових надходжень до шкільної бібліотеки Золотоніської ЗОШ №3
 
Презентація опорного закладу з БЖ та ОЗ
Презентація опорного закладу з БЖ та ОЗ Презентація опорного закладу з БЖ та ОЗ
Презентація опорного закладу з БЖ та ОЗ
 
Software per la gestione completa dei centri fitness e wellness: Gymgest
Software per la gestione completa dei centri fitness e wellness: GymgestSoftware per la gestione completa dei centri fitness e wellness: Gymgest
Software per la gestione completa dei centri fitness e wellness: Gymgest
 
Realm.io for iOS
Realm.io for iOSRealm.io for iOS
Realm.io for iOS
 
IoC and Mapper in C#
IoC and Mapper in C#IoC and Mapper in C#
IoC and Mapper in C#
 
РИФ 2016, Как сделать клиента счастливее и повысить фин. результаты. Опыт сер...
РИФ 2016, Как сделать клиента счастливее и повысить фин. результаты. Опыт сер...РИФ 2016, Как сделать клиента счастливее и повысить фин. результаты. Опыт сер...
РИФ 2016, Как сделать клиента счастливее и повысить фин. результаты. Опыт сер...
 
CocoaHeads Lyon 17/12/2011 : Arc
CocoaHeads Lyon 17/12/2011 : ArcCocoaHeads Lyon 17/12/2011 : Arc
CocoaHeads Lyon 17/12/2011 : Arc
 
Interfaz java y arduino
Interfaz java y arduinoInterfaz java y arduino
Interfaz java y arduino
 

Semelhante a React Library Overview

Introduction to React native
Introduction to React nativeIntroduction to React native
Introduction to React nativeDhaval Barot
 
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 DOMJimit Shah
 
An evening with React Native
An evening with React NativeAn evening with React Native
An evening with React NativeMike Melusky
 
React + Flux = Joy
React + Flux = JoyReact + Flux = Joy
React + Flux = JoyJohn Need
 
ReactJS vs AngularJS - Head to Head comparison
ReactJS vs AngularJS - Head to Head comparisonReactJS vs AngularJS - Head to Head comparison
ReactJS vs AngularJS - Head to Head comparison500Tech
 
Supercharge Your SharePoint Framework Webpart with React
Supercharge Your SharePoint Framework Webpart with ReactSupercharge Your SharePoint Framework Webpart with React
Supercharge Your SharePoint Framework Webpart with ReactEric Overfield
 
Introduction to react native with redux
Introduction to react native with reduxIntroduction to react native with redux
Introduction to react native with reduxMike Melusky
 
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 TestingEswara Kumar Palakollu
 
20171108 PDN HOL React Basics
20171108 PDN HOL React Basics20171108 PDN HOL React Basics
20171108 PDN HOL React BasicsRich Ross
 
React state management with Redux and MobX
React state management with Redux and MobXReact state management with Redux and MobX
React state management with Redux and MobXDarko Kukovec
 
Fundamental concepts of react js
Fundamental concepts of react jsFundamental concepts of react js
Fundamental concepts of react jsStephieJohn
 
Progressive Web Apps and React
Progressive Web Apps and ReactProgressive Web Apps and React
Progressive Web Apps and ReactMike Melusky
 
Building Modern Web Applications using React and Redux
 Building Modern Web Applications using React and Redux Building Modern Web Applications using React and Redux
Building Modern Web Applications using React and ReduxMaxime Najim
 
GITS Class #20: Building A Fast and Responsive UI in React Native
GITS Class #20: Building A Fast and Responsive UI in React NativeGITS Class #20: Building A Fast and Responsive UI in React Native
GITS Class #20: Building A Fast and Responsive UI in React NativeGITS Indonesia
 
Reconciling ReactJS as a View Layer Replacement (MidwestJS 2014)
Reconciling ReactJS as a View Layer Replacement (MidwestJS 2014)Reconciling ReactJS as a View Layer Replacement (MidwestJS 2014)
Reconciling ReactJS as a View Layer Replacement (MidwestJS 2014)Zach Lendon
 
MidwestJS 2014 Reconciling ReactJS as a View Layer Replacement
MidwestJS 2014 Reconciling ReactJS as a View Layer ReplacementMidwestJS 2014 Reconciling ReactJS as a View Layer Replacement
MidwestJS 2014 Reconciling ReactJS as a View Layer ReplacementZach Lendon
 

Semelhante a React Library Overview (20)

Introduction to React native
Introduction to React nativeIntroduction to React native
Introduction to React native
 
React a11y-csun
React a11y-csunReact a11y-csun
React a11y-csun
 
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
 
Fluxible
FluxibleFluxible
Fluxible
 
An evening with React Native
An evening with React NativeAn evening with React Native
An evening with React Native
 
React + Flux = Joy
React + Flux = JoyReact + Flux = Joy
React + Flux = Joy
 
React Native Firebase
React Native FirebaseReact Native Firebase
React Native Firebase
 
ReactJS vs AngularJS - Head to Head comparison
ReactJS vs AngularJS - Head to Head comparisonReactJS vs AngularJS - Head to Head comparison
ReactJS vs AngularJS - Head to Head comparison
 
Reactjs
Reactjs Reactjs
Reactjs
 
Supercharge Your SharePoint Framework Webpart with React
Supercharge Your SharePoint Framework Webpart with ReactSupercharge Your SharePoint Framework Webpart with React
Supercharge Your SharePoint Framework Webpart with React
 
Introduction to react native with redux
Introduction to react native with reduxIntroduction to react native with redux
Introduction to react native with redux
 
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
 
20171108 PDN HOL React Basics
20171108 PDN HOL React Basics20171108 PDN HOL React Basics
20171108 PDN HOL React Basics
 
React state management with Redux and MobX
React state management with Redux and MobXReact state management with Redux and MobX
React state management with Redux and MobX
 
Fundamental concepts of react js
Fundamental concepts of react jsFundamental concepts of react js
Fundamental concepts of react js
 
Progressive Web Apps and React
Progressive Web Apps and ReactProgressive Web Apps and React
Progressive Web Apps and React
 
Building Modern Web Applications using React and Redux
 Building Modern Web Applications using React and Redux Building Modern Web Applications using React and Redux
Building Modern Web Applications using React and Redux
 
GITS Class #20: Building A Fast and Responsive UI in React Native
GITS Class #20: Building A Fast and Responsive UI in React NativeGITS Class #20: Building A Fast and Responsive UI in React Native
GITS Class #20: Building A Fast and Responsive UI in React Native
 
Reconciling ReactJS as a View Layer Replacement (MidwestJS 2014)
Reconciling ReactJS as a View Layer Replacement (MidwestJS 2014)Reconciling ReactJS as a View Layer Replacement (MidwestJS 2014)
Reconciling ReactJS as a View Layer Replacement (MidwestJS 2014)
 
MidwestJS 2014 Reconciling ReactJS as a View Layer Replacement
MidwestJS 2014 Reconciling ReactJS as a View Layer ReplacementMidwestJS 2014 Reconciling ReactJS as a View Layer Replacement
MidwestJS 2014 Reconciling ReactJS as a View Layer Replacement
 

Último

Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
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.pdfWave PLM
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
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...kellynguyen01
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfCionsystems
 
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.pdfkalichargn70th171
 
Clustering techniques data mining book ....
Clustering techniques data mining book ....Clustering techniques data mining book ....
Clustering techniques data mining book ....ShaimaaMohamedGalal
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
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 GoalsJhone kinadey
 
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
 
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 ApplicationsAlberto González Trastoy
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
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.pdfkalichargn70th171
 

Último (20)

Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
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
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
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...
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdf
 
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
 
Clustering techniques data mining book ....
Clustering techniques data mining book ....Clustering techniques data mining book ....
Clustering techniques data mining book ....
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
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
 
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 ☂️
 
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
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
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
 

React Library Overview

  • 1. 18.08.2016 Fatih Şimşek - Software Infrastructure React
  • 2. React Open source Javascript Library Created by Jordan Walke, a software engineer at Facebook First deployed on Facebook’s newsfeed in 2011 Maintained by Facebook, Instagram and a community of individual developers and corporations
  • 3. Who is using React? 9flats - Airbnb - Alipay - Atlassian - BBC - Box - Capital One - Coursera -Dailymotion - Deezer - Docker - Expedia - Facebook - Fotocasa - HappyFresh - IMDb - Instacart - Instagram - Khan Academy - Klarna - Lyft - NBC - Netflix - NFL - Paypal - Periscope - Ralph Lauren - Reddit – Salesforce - Sberbank - Stack Overflow - Tesla - Tmall - The New York Times - Twitter Fabric - Twitter Mobile - Uber - WhatsApp - Wired - Yahoo - Zendesk https://github.com/facebook/react/wiki/Sites-Using-React
  • 5. React Creating user interface(V in MVC model) Speed Declarative Composable Learn Once, Write Anywhere Support ES6 Testable
  • 6. Write once, Run Everywhere React
  • 8. Architecture Component manage own state One way binding JSX Virtual DOM Component Lifecycle
  • 9. JSX Supports xml-like syntax inline in JavaScript Each element is transformed into a Javascript function call • <Hello /> => Hello(null) • <div /> => React.DOM.div(null)
  • 10. Virtual DOM Problem: • DOM manipulation is expensive • Touching DOM is hard to test • Re-render all parts of DOM make your app slowly
  • 11. Virtual DOM Solution: When the component’s state is changed, React • Use different algorithm with the browser DOM tree to identify the changes • Instead of creating new object, React just identify what change is took place and once identify update that state • Render the subtree of DOM elements into the rendering of the DOM
  • 13. DEMO
  • 14. Prop / State Prop: • Used to pass parameter from parent to children • PropTypes used to validate properties • getDefaultProps State: • Used to manage state inside component • getInitialState • setState
  • 16. Mixins / Statics Mixins: • Different components may share some common functionality • Several mixins can be defined • Methods defined on mixins run in the order mixins were listed Statics: • Like .Net / Java static method • Define static methods in statics block of component
  • 17. Events componentWillMount: Invoked once before the initial render componentDidMount: Invoked once, only on the client componentWillReceiveProps: Invoked when a component is receiving new props shouldComponentUpdate: Invoked before rendering when new props or state are being received componentWillUpdate: Invoked immediately before rendering when new props or state are being received componentDidUpdate: Invoked immediately after the component's updates are flushed to the DOM componentWillUnmount: Invoked immediately before a component is unmounted from the DOM
  • 19. DEMO
  • 20.
  • 21. Flux Action: Helper method that facilitate passing data to the Dispatcher Dispatcher: Receive action and broadcast payload to registered callback Store: Containers for application state & logic that have callbacks registered to the dispatcher View: State from Stores and pass it down via props to child components
  • 22. Flux
  • 23. Redux • Single source of truth • State is read-only • Mutations are written as pure functions (reducers)
  • 24. Redux • Important difference to Flux: no dispatching inside the action • There is no Dispatcher at all; pure functions do not need to be managed, they need to be composed • Mutations are written as pure functions

Notas do Editor

  1. In 2010, Facebook released an extension for PHP called XHP. XHP help to decrease XSS attack and make front-end much both readable and understand. There was a distinct problem with XHP: dynamic webapplications require many roundtrips to the server. XHP did not solve this problem. Jordan Walke negotiated with his manager to take XHP into the browser using JavaScript and was granted six months to try it It was first deployed on Facebook's newsfeed in 2011 and later on Instagram.com in 2012. It was open-sourced at JSConf US in May 2013. React Native, which enables native iOS and Android development with React, was announced at Facebook's React.js Conf in February 2015 and open-sourced in March 2015.
  2. http://reactkungfu.com/2015/07/big-names-using-react-js/ Netflix – React Conf 2015 https://www.youtube.com/watch?v=eNC0mRYGWgc Sberbank - the number one bank in Russia I must say, I was really shocked when I heard that the interactive part of bank’s website was developed in React. One of the developers working on that project shared his team’s experience on React’s Google Group. They were really happy about the speed of development with React. https://groups.google.com/forum/#!topic/reactjs/Kj6WATX0atg At Instagram we migrated from the standard Mustache/Backbone/jQuery trio to React with a little bit of Backbone. One big benefit of this move was that we could express our display logic with pure JS, so we can use all the standard object-oriented and procedural techniques to reuse code
  3. Speed! Render < 16ms Declarative Easier to reason about Easier to prevent bugs Composable ( build larger tree with Learn Once, Write Anywhere ( Mobile, Web )
  4. Facebook has been working to help build a cross-platform development platform called React. Earlier this year, Facebook announced React Native, a learn-once, run-everywhere platform to take JavaScript and build native-like apps for iOS and Android. Run on server-side on NodeJs. Discontinuing IE8 support in React DOM, January 2016.
  5. 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 Event flow up, data flow down
  6. Transform JSX to pure JavaScript immediately before execution Convenient for the developer Significant performance penalty Can’t be minified Use Babel.js / JSXTransformer.js deprecated https://babeljs.io/repl/
  7. http://www.slideshare.net/emadb/an-introduction-to-reactjs-46258876
  8. Simple Render (Hello World)
  9. https://facebook.github.io/react/docs/reusable-components.html
  10. componentWillMount: Good place to make connection to your db service componentDidMount: It is good place for you to make AJAX request to fetch data for first used. componentWillReceiveProps: Use this method as a way to react to a prop change before render() is called by updating the state with setState. componentWillUnmount: Perform any necessary cleanup in this method(Ex: invalidating timers, clear up DOM elements were created at componentDidMount)
  11. http://www.slideshare.net/xmlilley/react-flux-50660816 (23.slide)
  12. Sample Jquery / Knockout / AngularJs / React http://getbootstrap.com/css/#forms http://getbootstrap.com/components/#list-group http://getbootstrap.com/components/#glyphicons-examples
  13. Flux is an architecture that Facebook uses internally when working with React. It isnot a framework or a library. It is simply a new kind of architecture that complements React and the concept of Unidirectional Data Flow. Dispatcher is the central hub that manages all data flow, It is a registry of callbacks into the stores Action typically triggered by the View, contain information about change made to the application Store contain application state and logic, reacts to specific action. View has list of stores which provide data for, trigger action with the state changes
  14. After you use Flux the first time, writing React without Flux feels like DOM traversal without jQuery. You can absolutely do it, but it feels less elegant and structured. Flummox, Alt, Fluxxor are libraries implement Flux. https://scotch.io/tutorials/creating-a-simple-shopping-cart-with-react-js-and-flux http://fluxxor.com/examples/carousel/
  15. Actions are payloads of information that send data from your application to your store Reducer is a pure function that takes the previous state and an action, and returns the next state. Store is the object that brings them together. (holds application state) You call store.dispatch(action) The Redux store calls the reducer function you gave it The root reducer may combine the output of multiple reducers into a single state tree The Redux store saves the complete state tree returned by the root reducer
  16. BenchMark Site: https://cdn.rawgit.com/krausest/js-framework-benchmark/a358bc967e1d9ff0c268b43f5ab8b832abe0476e/webdriver-java/table.html https://github.com/krausest/js-framework-benchmark React & Angular2 http://www.slideshare.net/boyney123/reactjs-or-angular?qid=f24b044d-6e77-4eaa-b4f4-882c5a56f454&v=&b=&from_search=15