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
270
HTTP/2
oursky
0
310
watchOS2
oursky
0
270
Common QA issues
oursky
0
170
Complex is better than complicated
oursky
0
250
Clean code again
oursky
3
330
KiriKiri x O2 x NVLMarker
oursky
0
190
git_workflow.pdf
oursky
0
260
Other Decks in Programming
See All in Programming
テストケースの名前はどうつけるべきか?
orgachem
PRO
0
140
testcontainers のススメ
sgash708
1
120
コンテナをたくさん詰め込んだシステムとランタイムの変化
makihiro
1
130
Go の GC の不得意な部分を克服したい
taiyow
3
790
アクターシステムに頼らずEvent Sourcingする方法について
j5ik2o
4
280
情報漏洩させないための設計
kubotak
2
260
rails statsで大解剖 🔍 “B/43流” のRailsの育て方を歴史とともに振り返ります
shoheimitani
2
940
責務を分離するための例外設計 - PHPカンファレンス 2024
kajitack
6
1.1k
わたしの星のままで一番星になる ~ 出産を機にSIerからEC事業会社に転職した話 ~
kimura_m_29
0
180
The Efficiency Paradox and How to Save Yourself and the World
hollycummins
1
450
Cloudflare MCP ServerでClaude Desktop からWeb APIを構築
kutakutat
1
550
103 Early Hints
sugi_0000
1
230
Featured
See All Featured
Building Applications with DynamoDB
mza
91
6.1k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
0
98
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
59k
BBQ
matthewcrist
85
9.4k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
247
1.3M
4 Signs Your Business is Dying
shpigford
181
21k
Building Better People: How to give real-time feedback that sticks.
wjessup
365
19k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
It's Worth the Effort
3n
183
28k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.5k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
28
2.1k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
29
2k
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