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
The Redux The State Management
Search
Sastra Nababan
June 22, 2017
Programming
2
95
The Redux The State Management
Sastra Nababan
June 22, 2017
Tweet
Share
More Decks by Sastra Nababan
See All by Sastra Nababan
Developer Circles Overview
sastranababan
0
86
Getting Started with ReactJs & Ecosystem
sastranababan
1
220
Javascript Ecosystem Overview
sastranababan
0
79
Functional Programming Javascript
sastranababan
2
360
SADIA
sastranababan
0
130
Other Decks in Programming
See All in Programming
11年かかって やっとVibe Codingに 時代が追いつきましたね
yimajo
1
260
Portapad紹介プレゼンテーション
gotoumakakeru
1
130
書き捨てではなく継続開発可能なコードをAIコーディングエージェントで書くために意識していること
shuyakinjo
1
270
中級グラフィックス入門~効率的なメッシュレット描画~
projectasura
4
2.6k
20250808_AIAgent勉強会_ClaudeCodeデータ分析の実運用〜競馬を題材に回収率100%の先を目指すメソッドとは〜
kkakeru
0
160
CLI ツールを Go ライブラリ として再実装する理由 / Why reimplement a CLI tool as a Go library
ktr_0731
3
1.1k
オホーツクでコミュニティを立ち上げた理由―地方出身プログラマの挑戦 / TechRAMEN 2025 Conference
lemonade_37
2
460
ZeroETLで始めるDynamoDBとS3の連携
afooooil
0
160
Infer入門
riru
4
1.5k
DynamoDBは怖くない!〜テーブル設計の勘所とテスト戦略〜
hyamazaki
0
200
技術的負債で信頼性が限界だったWordPress運用をShifterで完全復活させた話
rvirus0817
1
1.5k
Dart 参戦!!静的型付き言語界の隠れた実力者
kno3a87
0
190
Featured
See All Featured
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
229
22k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
Building a Modern Day E-commerce SEO Strategy
aleyda
43
7.4k
Art, The Web, and Tiny UX
lynnandtonic
301
21k
Designing for Performance
lara
610
69k
Faster Mobile Websites
deanohume
308
31k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
139
34k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
60k
Fireside Chat
paigeccino
38
3.6k
Docker and Python
trallard
45
3.5k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3.4k
Transcript
Redux The State Management Sastra Nababan By
What is Redux ? Predictable state container for Javascript Apps
✓ State Management ✓ State Container ✓ Data Binding Also known as frontend javascript library for :
What is State Anyway ? Hey…. You keep talking about
state
State is….. Memory/Space to hold your app information ✓ Data
✓ Communication ✓ Action ✓ Session ✓ Location
Server Client Send Request Process & Rendering 1 3 2
Server Send Rendered Page Client Most of your app state stay here Server Side Rendering
Server Client Send Request Process & Rendering 1 3 2
Server Send Data Client Most of your app state stay here Client Side Rendering Now your state lives here too 4 Client Rendering
Things become complex & crazy App Growth
Can Redux Help ? Yes, Let Redux do that things
for you
Why Redux so popular in react world ? React Redux
+
React app made by component hierarchy
Component Communication The Challange is…..
Component Communication Scenario Parent to Child Child to Parent
Component Communication Scenario Sibling to Sibling Any to Any
Can you image this ?
Ok now let’s talk about Redux
How to learn Redux ? ✓ Understand the big picture
✓ Get familiar with basic functional programming ‣ Pure Function ‣ Filter ‣ Map ‣ Reduce ‣ Compose ‣ Immutability
When to use Redux ? If you aren't sure if
you need it, you don't need it. - Pete Hunt I would like to amend this: don't use Redux until you have problems with vanilla React. - Dan Abramov “ “ Today. - Sastra Nababan “
Redux Principle 1 of 3 Single source of truth It’s
called store. Whole application state stored here
Server Client Client Side Rendering with Redux
React Component Communication with Redux
React app made by component hierarchy
Redux Principle 2 of 3 State is read only The
only way to change the state is to emit an action
Redux Principle 3 of 3 Changes are made with pure
functions The only way to change the state is to emit an action
Redux Architecture Components in app Actions Store Reducer store.dispatch(action)
Store is… Plain object of app state
Action
Reducer
Advanced Topic
Middleware The moment point between dispatching an action & reducer
Components in app Actions Store Reducer store.dispatch(action) Middleware • logging • crash reporting • asynchronous API • routing • etc
Async ✓ redux-thunk ✓ redux-promises ✓ redux-sagas ( es6 generator
) How to manage async process ?
Redux Persist How to Store data locally ? ✓ HTML5
Local Storage ✓ redux-persist ✓ redux-storage
/,
Thanks Mauliate