Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Flux + React
Search
Oursky Limited
June 23, 2015
Programming
1
350
Flux + React
Oursky Limited
June 23, 2015
Tweet
Share
More Decks by Oursky Limited
See All by Oursky Limited
UI Automation
oursky
1
450
SSH Can
oursky
1
280
HTTP/2
oursky
0
310
watchOS2
oursky
0
290
Common QA issues
oursky
0
170
Complex is better than complicated
oursky
0
260
Clean code again
oursky
3
340
KiriKiri x O2 x NVLMarker
oursky
0
190
git_workflow.pdf
oursky
0
260
Other Decks in Programming
See All in Programming
富山発の個人開発サービスで日本中の学校の業務を改善した話
krpk1900
4
370
CNCF Project の作者が考えている OSS の運営
utam0k
5
690
Introduction to kotlinx.rpc
arawn
0
630
CloudNativePGがCNCF Sandboxプロジェクトになったぞ! 〜CloudNativePGの仕組みの紹介〜
nnaka2992
0
220
Ruby on cygwin 2025-02
fd0
0
140
テストをしないQAエンジニアは何をしているか?
nealle
0
130
Spring gRPC について / About Spring gRPC
mackey0225
0
220
AWS Lambda functions with C# 用の Dev Container Template を作ってみた件
mappie_kochi
0
240
Grafana Cloudとソラカメ
devoc
0
140
SpringBoot3.4の構造化ログ #kanjava
irof
2
970
sappoRo.R #12 初心者セッション
kosugitti
0
230
2,500万ユーザーを支えるSREチームの6年間のスクラムのカイゼン
honmarkhunt
6
5.1k
Featured
See All Featured
Rebuilding a faster, lazier Slack
samanthasiow
79
8.8k
We Have a Design System, Now What?
morganepeng
51
7.4k
A Philosophy of Restraint
colly
203
16k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
29
4.6k
How to Ace a Technical Interview
jacobian
276
23k
It's Worth the Effort
3n
184
28k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
4 Signs Your Business is Dying
shpigford
182
22k
Become a Pro
speakerdeck
PRO
26
5.1k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
29
1k
VelocityConf: Rendering Performance Case Studies
addyosmani
328
24k
What's in a price? How to price your products and services
michaelherold
244
12k
Transcript
Flux + React Rick Mak May 2015
One of the pain DOM
Direct DOM = painful = BUG
Age of Backbone Model View
Works Great in small scale
more Model; more View
It is SLOW
Let Optimise it
None
Say Hello to VirtualDOM
Model Virtual DOM DOM Interact with VirtualDOM Data Data Event
Event
setState will trigger render Define your view
React calculate the diff • Set state will mark the
red dot • React will find out the blue dots • Re-render with only the modified dom Source: https://facebook.github.io/react/img/blog/react-diff-tree.png
Fast without spaghetti
Let focus on Logic
State inconsistency Very common in single page webapp
State inconsistency • Server sync not sync with client state
• item missing • duplicate item • State between client not sync • State panic with poor internet
Flux fix that
It is a pattern A pattern enforcing unidirectional data flow
Flux is not framework
View Action Store Dispatcher Server
Unidirectional data flow • Faster debug • Faster on boarding
• Faster iteration • Less cascading effect
Thank you