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
Kanzawa.rbのLT大会を支える技術の裏側を変更する Ruby on Rails + Litestream 編
muryoimpl
0
220
Lottieアニメーションをカスタマイズしてみた
tahia910
0
120
定理証明プラットフォーム lapisla.net
abap34
1
1.7k
Pythonでもちょっとリッチな見た目のアプリを設計してみる
ueponx
1
480
How mixi2 Uses TiDB for SNS Scalability and Performance
kanmo
30
11k
[Fin-JAWS 第38回 ~re:Invent 2024 金融re:Cap~]FaultInjectionServiceアップデート@pre:Invent2024
shintaro_fukatsu
0
400
sappoRo.R #12 初心者セッション
kosugitti
0
230
第3回 Snowflake 中部ユーザ会- dbt × Snowflake ハンズオン
hoto17296
4
360
ARA Ansible for the teams
kksat
0
150
Writing documentation can be fun with plugin system
okuramasafumi
0
120
TokyoR116_BeginnersSession1_環境構築
kotatyamtema
0
110
Honoをフロントエンドで使う 3つのやり方
yusukebe
5
2.2k
Featured
See All Featured
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
12
950
Rails Girls Zürich Keynote
gr2m
94
13k
Designing for Performance
lara
604
68k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
A Philosophy of Restraint
colly
203
16k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
20
2.4k
[RailsConf 2023] Rails as a piece of cake
palkan
53
5.2k
VelocityConf: Rendering Performance Case Studies
addyosmani
328
24k
Java REST API Framework Comparison - PWX 2021
mraible
28
8.4k
Faster Mobile Websites
deanohume
306
31k
A designer walks into a library…
pauljervisheath
205
24k
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