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
CloudNativePGがCNCF Sandboxプロジェクトになったぞ! 〜CloudNativePGの仕組みの紹介〜
nnaka2992
0
220
Lottieアニメーションをカスタマイズしてみた
tahia910
0
120
Open source software: how to live long and go far
gaelvaroquaux
0
620
SwiftUIで単方向アーキテクチャを導入して得られた成果
takuyaosawa
0
260
Honoとフロントエンドの 型安全性について
yodaka
4
250
Kanzawa.rbのLT大会を支える技術の裏側を変更する Ruby on Rails + Litestream 編
muryoimpl
0
220
“あなた” の開発を支援する AI エージェント Bedrock Engineer / introducing-bedrock-engineer
gawa
11
1.8k
JavaScriptツール群「UnJS」を5分で一気に駆け巡る!
k1tikurisu
10
1.8k
[JAWS-UG横浜 #79] re:Invent 2024 の DB アップデートは Multi-Region!
maroon1st
1
140
Honoのおもしろいミドルウェアをみてみよう
yusukebe
1
200
一休.com のログイン体験を支える技術 〜Web Components x Vue.js 活用事例と最適化について〜
atsumim
0
110
Pulsar2 を雰囲気で使ってみよう
anoken
0
230
Featured
See All Featured
The Illustrated Children's Guide to Kubernetes
chrisshort
48
49k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
49
2.3k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.3k
Embracing the Ebb and Flow
colly
84
4.6k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.1k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
40
2k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
175
51k
Unsuck your backbone
ammeep
669
57k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
12
950
Practical Orchestrator
shlominoach
186
10k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
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