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
280
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
ATDDで素早く安定した デリバリを実現しよう!
tonnsama
1
1.9k
Асинхронность неизбежна: как мы проектировали сервис уведомлений
lamodatech
0
1.3k
テストコード書いてみませんか?
onopon
2
340
EC2からECSへ 念願のコンテナ移行と巨大レガシーPHPアプリケーションの再構築
sumiyae
3
590
AppRouterを用いた大規模サービス開発におけるディレクトリ構成の変遷と問題点
eiganken
1
450
混沌とした例外処理とエラー監視に秩序をもたらす
morihirok
13
2.3k
PSR-15 はあなたのための ものではない? - phpcon2024
myamagishi
0
410
PHPカンファレンス 2024|共創を加速するための若手の技術挑戦
weddingpark
0
140
React 19でお手軽にCSS-in-JSを自作する
yukukotani
5
560
HTML/CSS超絶浅い説明
yuki0329
0
190
非ブラウザランタイムとWeb標準 / Non-Browser Runtimes and Web Standards
petamoriken
0
430
Androidアプリの One Experience リリース
nein37
0
1.2k
Featured
See All Featured
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
26
1.9k
Producing Creativity
orderedlist
PRO
343
39k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
8
1.2k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
Documentation Writing (for coders)
carmenintech
67
4.5k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
6
500
Gamification - CAS2011
davidbonilla
80
5.1k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
7k
The Cost Of JavaScript in 2023
addyosmani
46
7.2k
Mobile First: as difficult as doing things right
swwweet
222
9k
Agile that works and the tools we love
rasmusluckow
328
21k
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