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
tidymodelsによるtidyな生存時間解析 / Japan.R2024
dropout009
1
770
ソフトウェアの振る舞いに着目し 複雑な要件の開発に立ち向かう
rickyban
0
890
CSC509 Lecture 14
javiergs
PRO
0
140
生成AIでGitHubソースコード取得して仕様書を作成
shukob
0
310
テスト自動化失敗から再挑戦しチームにオーナーシップを委譲した話/STAC2024 macho
ma_cho29
1
1.3k
Mermaid x AST x 生成AI = コードとドキュメントの完全同期への道
shibuyamizuho
0
160
return文におけるstd::moveについて
onihusube
1
980
わたしの星のままで一番星になる ~ 出産を機にSIerからEC事業会社に転職した話 ~
kimura_m_29
0
180
開発者とQAの越境で自動テストが増える開発プロセスを実現する
92thunder
1
180
선언형 UI에서의 상태관리
l2hyunwoo
0
150
数十万行のプロジェクトを Scala 2から3に完全移行した
xuwei_k
0
270
Criando Commits Incríveis no Git
marcelgsantos
2
170
Featured
See All Featured
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
Designing on Purpose - Digital PM Summit 2013
jponch
116
7k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
What's in a price? How to price your products and services
michaelherold
243
12k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
2
170
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
2
290
XXLCSS - How to scale CSS and keep your sanity
sugarenia
247
1.3M
The Cult of Friendly URLs
andyhume
78
6.1k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
132
33k
Side Projects
sachag
452
42k
It's Worth the Effort
3n
183
28k
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