SlideShare a Scribd company logo
discover
React
Massimo Iacolare
@iacoware
Questions?
react
Hello
react
a library to build
user interfaces
by Facebook
2013
may
2013 open source
may
2013 open source
may
2011 production
facebook
facebook
instagram
airbnb
new york times
khan academy
Discover React
yahoo
netflix
codecademy
flipboard
and many others…paypal
battle
tested
Discover React
skeptical
Syndrome
reaction
Brace yourself
Brace yourself
Brace yourself
Wat?
html + js
Mixing concerns
==
html + js
Mixing concerns
==
Really?
html + js
js coupled to html
inevitably
highly cohesive
maybe?
js coupled to html
inevitably
react
module
high cohesive
component
concerns
separation of
concerns
separation of
==
components
separation of
assumptions will
be challenged
open mind
keep an
assumptions will
be challenged
YAWODS?
Why should I learn
YAWODS?
Why should I learn
yet another way of doing stuff
better ux
quest to
frontend
ambitious
today’s challenges
complexity
high performance
accidental
everywhere
explicit over implicit
always seek predictability
declarative over imperative
keep
complexity
accidental
low
react
pillars
everything is a
component
components
data
+
components
data
+
lots of them
shaken,
not stirred
components
data
+
lots of them
shaken,
not stirred
components
data
+
app
lots of them
components
all the
way
down
todo
app
render()
only
function
requirement
lifecyclecomponent
componentWillMount()
componentDidMount()
componentWillReceiceProps()
componentWillUpdate()
componentDidUpdate()
componentWillUnmount()
trasform
into
jsx
js
to
let’s talk about jsx
expressions - events - styles
jsx looks like an abomination
embedded
components
jsx
↓
smaller
SRP & resusability
↓
++
How do we
pass data to
components?
Two kinds
of data
props & state
this.props
type checkoptional
immutable can’t touch it
makes tracking
down bugs easier
very easy to
reason about
props
passed from parent
this.props to read
stateless component
How data flows
How data flows
props passed
from parent
pass callbacks to
setup a simple
communication
mechanism
this.state
mutable
State
created inside comp
this.state to read
stateful component
this.setstate to write
How data flows
How data flows
How data flows
state can
become props
state is private
by default
data flows down
callbacks flow up
props
immutable
passed from parent
stateless comp.
state
mutable
created inside comp.
stateful comp.
this.props to read this.state to read
this.setState() to write
why?
is evil
mutable state
because
is evil
mutable state
source of
complexity
is evil
because
ok cool but…
data changes?
what happens when
React
doesn’t use
React
two-way
databinding
two-way
databinding
lead to
two-way
databinding
cascading
updates
two-way
databinding
implict way
two-way
databinding
mutate
state
is evil
mutable state
remember?
is evil
mutable state
source of
complexity
is evil
remember?
every time setState()
every time setState()
re-render everything
every time setState()
re-render
simpler
everything
mental model
every time setState()
re-render
simpler
everything
mental model
re-render…
every time setState()
re-render
simpler
everything
mental model
Wat?re-render…
virtual dom to the rescue
VDOM facts
render return virtual dom…
VDOM facts
render return virtual dom…
…an in-memory, lightweight
representation of the DOM
VDOM facts
render return virtual dom…
…an in-memory, lightweight
representation of the DOM
react is write-only to the DOM
VDOM facts
render()
render()
return a
description
of the UI
state describe
introduction to reactjs
for every
change of
state describe
introduction to reactjs
for every
change of
state describe
the whole
user interface
introduction to reactjs
data
render(data)
render(data uispecification
)
declarative, stateless
approach
over
imperative, stateful api
1. everything is a component
Recap
3. think in state, DOM will
follow
4. virtual dom is awesome
2. how data flows
flux
Wait there’s more
isomorphic app
immutable-js
relay-graphql
css in js
baobab
react-native
time
coding
react playground
discover react @apericoder
clone and play!
discover react @Bologna JS
thanks!
That’s all
Discover React
Discover React

More Related Content

What's hot (20)

PDF
Integrating React.js with PHP projects
Ignacio Martín
 
KEY
Making Ajax Sexy, JSConf 2010
guest3a77e5d
 
KEY
Making Ajax Sexy, JSConf 2010
Dave Furfero
 
PDF
Extending Redux in the Server Side
Ignacio Martín
 
PPTX
JavaScript APIs you’ve never heard of (and some you have)
Nicholas Zakas
 
PPTX
Art of Javascript
Tarek Yehia
 
PDF
JavaScript - From Birth To Closure
Robert Nyman
 
PPTX
Introduction to jQuery
Gunjan Kumar
 
PPTX
Getting the Most Out of jQuery Widgets
velveeta_512
 
PPTX
Lesson 203 18 sep13-1500-ay
Codecademy Ren
 
PDF
Having Fun with Play
Clinton Dreisbach
 
PPT
jQuery 1.7 Events
dmethvin
 
PPTX
Think Async in Java 8
Dmitry Alexandrov
 
PDF
Maintainable JavaScript
Nicholas Zakas
 
PPTX
Unobtrusive javascript with jQuery
Angel Ruiz
 
PPTX
QA Fest 2017. Ярослав Святкин. Тестовый фреймворк GEB для тестирования WEB пр...
QAFest
 
PPTX
Maintainable JavaScript 2012
Nicholas Zakas
 
PDF
Scalable CSS You and Your Back-End Coders Can Love - @CSSConf Asia 2014
Christian Lilley
 
PPTX
"Final fsFighting Complex Application State Management with Finite-State Mach...
Fwdays
 
PDF
React
중운 박
 
Integrating React.js with PHP projects
Ignacio Martín
 
Making Ajax Sexy, JSConf 2010
guest3a77e5d
 
Making Ajax Sexy, JSConf 2010
Dave Furfero
 
Extending Redux in the Server Side
Ignacio Martín
 
JavaScript APIs you’ve never heard of (and some you have)
Nicholas Zakas
 
Art of Javascript
Tarek Yehia
 
JavaScript - From Birth To Closure
Robert Nyman
 
Introduction to jQuery
Gunjan Kumar
 
Getting the Most Out of jQuery Widgets
velveeta_512
 
Lesson 203 18 sep13-1500-ay
Codecademy Ren
 
Having Fun with Play
Clinton Dreisbach
 
jQuery 1.7 Events
dmethvin
 
Think Async in Java 8
Dmitry Alexandrov
 
Maintainable JavaScript
Nicholas Zakas
 
Unobtrusive javascript with jQuery
Angel Ruiz
 
QA Fest 2017. Ярослав Святкин. Тестовый фреймворк GEB для тестирования WEB пр...
QAFest
 
Maintainable JavaScript 2012
Nicholas Zakas
 
Scalable CSS You and Your Back-End Coders Can Love - @CSSConf Asia 2014
Christian Lilley
 
"Final fsFighting Complex Application State Management with Finite-State Mach...
Fwdays
 
React
중운 박
 

Viewers also liked (8)

PPTX
Introduction to Facebook React
Mitch Chen
 
PDF
Crossing platforms with JavaScript & React
Robert DeLuca
 
PPTX
Introduction to react_js
MicroPyramid .
 
PDF
Introduction to ReactJS
Hoang Long
 
PPTX
A Brief Introduction to React.js
Doug Neiner
 
PPTX
React + Redux Introduction
Nikolaus Graf
 
PPT
React js
Jai Santhosh
 
Introduction to Facebook React
Mitch Chen
 
Crossing platforms with JavaScript & React
Robert DeLuca
 
Introduction to react_js
MicroPyramid .
 
Introduction to ReactJS
Hoang Long
 
A Brief Introduction to React.js
Doug Neiner
 
React + Redux Introduction
Nikolaus Graf
 
React js
Jai Santhosh
 
Ad

Similar to Discover React (20)

PDF
React Interview Question PDF By ScholarHat
Scholarhat
 
PPTX
reactJS
Syam Santhosh
 
PPTX
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
Karmanjay Verma
 
PPTX
ReactJS Code Impact
Raymond McDermott
 
PDF
Welcome to React & Flux !
Ritesh Kumar
 
PPTX
Introduction to React JS.pptx
SHAIKIRFAN715544
 
PPTX
ReactJs
Sahana Banerjee
 
PPTX
[Final] ReactJS presentation
洪 鹏发
 
PPTX
Introduction to ReactJS UI Web Dev .pptx
SHAIKIRFAN715544
 
PDF
Intro to react_v2
Feather Knee
 
PDF
React && React Native workshop
Stacy Goh
 
PDF
100 React Interview questions 2024.pptx.pdf
codevincent624
 
PDF
react-slides.pdf
DayNightGaMiNg
 
PDF
react-slides.pdf gives information about react library
janet736113
 
PPTX
Reactjs
Neha Sharma
 
PPTX
react-slides.pptx
DayNightGaMiNg
 
PPTX
React + Flux = Joy
John Need
 
PPTX
react-slidlkjfl;kj;dlkjopidfjhopijgpoerjpofjiwoepifjopweifjepoies.pptx
PrathamSharma77833
 
PDF
Workshop 19: ReactJS Introduction
Visual Engineering
 
PPTX
TRAINING pptt efwoiefo weoifjoiewjfoifjow.pptx
PrathamSharma77833
 
React Interview Question PDF By ScholarHat
Scholarhat
 
reactJS
Syam Santhosh
 
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
Karmanjay Verma
 
ReactJS Code Impact
Raymond McDermott
 
Welcome to React & Flux !
Ritesh Kumar
 
Introduction to React JS.pptx
SHAIKIRFAN715544
 
[Final] ReactJS presentation
洪 鹏发
 
Introduction to ReactJS UI Web Dev .pptx
SHAIKIRFAN715544
 
Intro to react_v2
Feather Knee
 
React && React Native workshop
Stacy Goh
 
100 React Interview questions 2024.pptx.pdf
codevincent624
 
react-slides.pdf
DayNightGaMiNg
 
react-slides.pdf gives information about react library
janet736113
 
Reactjs
Neha Sharma
 
react-slides.pptx
DayNightGaMiNg
 
React + Flux = Joy
John Need
 
react-slidlkjfl;kj;dlkjopidfjhopijgpoerjpofjiwoepifjopweifjepoies.pptx
PrathamSharma77833
 
Workshop 19: ReactJS Introduction
Visual Engineering
 
TRAINING pptt efwoiefo weoifjoiewjfoifjow.pptx
PrathamSharma77833
 
Ad

More from Massimo Iacolare (7)

PDF
What FizzBuzz can teach us about design
Massimo Iacolare
 
PDF
Coding Dojo Firenze - vol1
Massimo Iacolare
 
PDF
#NoEstimates Thinking
Massimo Iacolare
 
PDF
NoEstimates @ miniIAD
Massimo Iacolare
 
PDF
Web Performance Optimization @Develer
Massimo Iacolare
 
PDF
Web performance optimization
Massimo Iacolare
 
PDF
Single Page Applications
Massimo Iacolare
 
What FizzBuzz can teach us about design
Massimo Iacolare
 
Coding Dojo Firenze - vol1
Massimo Iacolare
 
#NoEstimates Thinking
Massimo Iacolare
 
NoEstimates @ miniIAD
Massimo Iacolare
 
Web Performance Optimization @Develer
Massimo Iacolare
 
Web performance optimization
Massimo Iacolare
 
Single Page Applications
Massimo Iacolare
 

Recently uploaded (20)

PDF
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
PPTX
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
PDF
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
PDF
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
PDF
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
PDF
Timothy Rottach - Ramp up on AI Use Cases, from Vector Search to AI Agents wi...
AWS Chicago
 
PDF
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PDF
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
PDF
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
PDF
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
PDF
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
Timothy Rottach - Ramp up on AI Use Cases, from Vector Search to AI Agents wi...
AWS Chicago
 
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 

Discover React