Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
The React Approach for Building Apps
Search
Ricardo Soares
March 08, 2016
Programming
39
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
The React Approach for Building Apps
Ricardo Soares
March 08, 2016
Transcript
32 slides
The React Approach for Building Apps Or how it breaks
tradition
It’s all about perspective ...
It’s all about perspective - BackboneJS is a lightweight MV*
library - AngularJS focus on extending HTML - EmberJS is more imperative - ReactJS sets a functional design pattern - VueJS prefers the “visual” separation of concerns
Tradition HTML JavaScript CSS DOM Network Cache
Tradition HTML JavaScript CSS DOM Network Cache UI DATA
Sometimes tradition is hard to deal with
Sometimes tradition is hard to deal with JavaScript UI
Sometimes tradition is hard to deal JavaScript onfocus UI
Sometimes tradition is hard to deal JavaScript onclick onfocus UI
Sometimes tradition is hard to deal JavaScript onclick onfocus onchange
UI
Sometimes tradition is hard to deal JavaScript onclick onfocus onchange
... UI
Sometimes tradition is hard to deal JavaScript onclick onfocus onchange
... UI updateA()
Sometimes tradition is hard to deal JavaScript onclick onfocus onchange
... UI updateB() updateA()
Sometimes tradition is hard to deal JavaScript onclick onfocus onchange
... UI updateC() updateB() updateA()
Sometimes tradition is hard to deal JavaScript onclick onfocus onchange
... UI ... updateC() updateB() updateA()
Sometimes tradition is hard to deal JavaScript onclick onfocus onchange
... UI ... updateC() updateB() updateA() DATA
Sometimes tradition is hard to deal JavaScript onclick onfocus onchange
... UI ... updateC() updateB() updateA() DATA onprogress
Sometimes tradition is hard to deal JavaScript onclick onfocus onchange
... UI ... updateC() updateB() updateA() DATA onprogress onload
Sometimes tradition is hard to deal JavaScript onclick onfocus onchange
... UI ... updateC() updateB() updateA() DATA onprogress onload onerror
Sometimes tradition is hard to deal JavaScript onclick onfocus onchange
... UI ... updateC() updateB() updateA() DATA onprogress onload onerror ...
Sometimes tradition is hard to deal JavaScript onclick onfocus onchange
... UI ... updateC() updateB() updateA() DATA onprogress onload onerror ... MUCH STATE!
Sometimes tradition is hard to deal - Key-Value Observation (Backbone,
Ember) - Dirty Checking (Angular)
The problem - Deal with the DOM stateful nature -
Seamlessly react to actions/events - Eventually apply updates to the real DOM (and maintain performance)
A different approach - Simple - Predictable - Reliable
Virtual DOM
Virtual DOM A N C B Virtual DOM ... DOM
Successive renders Updates
Lower internals footprint “Simplicity is prerequisite for reliability” Edsger W.
Dijkstra
It’s functional!
It is composable!
It’s a state machine!
Recap - Lots of different approaches out there - Some
have more opinionated than others - DOM is stateful and JS is not reactive - React approach: a Virtual DOM - React was built for simplicity
Thank you! rsoares @botequilha References: http://teropa.info/blog/2015/03/02/change-and-its-detection-in-javascript-frameworks.html https://facebook.github.io/react/docs/displaying-data.html https://www.youtube.com/watch?v=-DX3vJiqxm4
More Decks by Ricardo Soares
See All by Ricardo Soares
Refactor: the tool should not be your process
rsoares
0
58
A gentle intro to Backbone.js
rsoares
0
59
Other Decks in Programming
See All in Programming
Getting Started with Vibe Coding
miccheng
0
250
仕様駆動開発入門 (何を作るかを先に決めて渡す) | 目指せ Kiro マスター 05
inariku
PRO
3
220
JavaScriptはシングルバイナリの夢を見るか / Does JavaScript Dream of a Single Binary?
ssssota
0
180
地方こそサーバーレス — 10年続けた、顔が見えるチームで確かな基盤を / Serverless Matters Most in Regional Areas — 10 Years of Building Reliable Foundations with Close-Knit Teams
seike460
PRO
2
520
はじめてのKubernetesコントリビューション
nasa9084
0
320
ローカルLLMの基本と近況 2611 / Local LLM basics and recent situation 2611
kishida
3
660
Ruby から Emacs を操作したい
phigasui
0
390
Claude Code ハーネスDeep Dive – 君はどこまで制御する? -
takateeen_knj
6
6.3k
マルチプロダクトSaaSの アプリ一覧を速くする——複数プロダクトにまたがる「権限行脚」を減らすまで #techramen26conf
mktakuya
1
220
疎結合とは何か?ソフトウェア設計における結合バランスについて考える #phpcon_niigata
kajitack
2
420
社内AIエージェント「Askワンバン」における コストチューニングの取り組み
t0yohei
0
180
Kawaiicon: Kubernetes, it's no longer cool, but let's secure it anyway!
barnbarn
0
150
Featured
See All Featured
First, design no harm
axbom
PRO
2
1.4k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
A better future with KSS
kneath
240
18k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.9k
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
3.3k
Chasing Engaging Ingredients in Design
codingconduct
0
410
Designing Powerful Visuals for Engaging Learning
tmiket
1
660
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
330
Tell your own story through comics
letsgokoyo
1
1.1k
Odyssey Design
rkendrick25
PRO
3
970
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
640
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
850