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
380
Flux + React
Oursky Limited
June 23, 2015
Tweet
Share
More Decks by Oursky Limited
See All by Oursky Limited
UI Automation
oursky
1
490
SSH Can
oursky
1
310
HTTP/2
oursky
0
340
watchOS2
oursky
0
330
Common QA issues
oursky
0
200
Complex is better than complicated
oursky
0
280
Clean code again
oursky
3
360
KiriKiri x O2 x NVLMarker
oursky
0
230
git_workflow.pdf
oursky
0
290
Other Decks in Programming
See All in Programming
TransformerからMCPまで(現代AIを理解するための羅針盤)
mickey_kubo
7
5.6k
Claude Agent SDK を使ってみよう
hyshu
0
1.4k
外接に惑わされない自システムの処理時間SLIをOpenTelemetryで実現した話
kotaro7750
0
110
NixOS + Kubernetesで構築する自宅サーバーのすべて
ichi_h3
0
1.2k
組込みだけじゃない!TinyGo で始める無料クラウド開発入門
otakakot
2
380
マンガアプリViewerの大画面対応を考える
kk__777
0
390
Goで実践するドメイン駆動開発 AIと歩み始めた新規プロダクト開発の現在地
imkaoru
4
920
Vueのバリデーション、結局どれを選べばいい? ― 自作バリデーションの限界と、脱却までの道のり ― / Which Vue Validation Library Should We Really Use? The Limits of Self-Made Validation and How I Finally Moved On
neginasu
2
1.7k
O Que É e Como Funciona o PHP-FPM?
marcelgsantos
0
220
CSC305 Lecture 11
javiergs
PRO
0
310
コードとあなたと私の距離 / The Distance Between Code, You, and I
hiro_y
0
200
alien-signals と自作 OSS で実現する フレームワーク非依存な ロジック共通化の探求 / Exploring Framework-Agnostic Logic Sharing with alien-signals and Custom OSS
aoseyuu
2
760
Featured
See All Featured
The Illustrated Children's Guide to Kubernetes
chrisshort
49
51k
The Art of Programming - Codeland 2020
erikaheidi
56
14k
Visualization
eitanlees
150
16k
Statistics for Hackers
jakevdp
799
220k
Keith and Marios Guide to Fast Websites
keithpitt
411
23k
Mobile First: as difficult as doing things right
swwweet
225
10k
The Cost Of JavaScript in 2023
addyosmani
55
9.1k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
140
34k
Documentation Writing (for coders)
carmenintech
75
5.1k
YesSQL, Process and Tooling at Scale
rocio
173
15k
Faster Mobile Websites
deanohume
310
31k
GraphQLとの向き合い方2022年版
quramy
49
14k
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