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
110
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
The Redux The State Management
Sastra Nababan
June 22, 2017
More Decks by Sastra Nababan
See All by Sastra Nababan
Developer Circles Overview
sastranababan
0
96
Getting Started with ReactJs & Ecosystem
sastranababan
1
230
Javascript Ecosystem Overview
sastranababan
0
87
Functional Programming Javascript
sastranababan
2
400
SADIA
sastranababan
0
140
Other Decks in Programming
See All in Programming
レビュー履歴をAIに食わせて、 Compose移行を加速するs
shihochan
0
170
まずはプロンプトガイドを読もう、話はそれからだ
kiakiraki
1
180
ソフトウェアエンジニアにとっての生成AI - 特性を知って使い倒す / generative ai for software enginner
kishida
7
2.1k
これって Effect でできたのでは? / TSKaigi Mashup Kansai #2
susisu
0
250
変わらないものが、変わるものを決める — 意図駆動開発 × イベントソーシング × イミュータブル | What Doesn't Change Decides What Can — IDD × Event Sourcing × Immutability
tomohisa
0
1.8k
全PRの83%がAIレビューだけでマージできるようになった開発組織はその後どうなったか
athug
1
1.9k
片田舎のおっさん、 Swift Buildのダイアモンド問題解決の不具合修正PRを出すが、解決方法がキャッシュをしないようにすることであり、ビルド時間が伸びると言われてマージされないので高速化もする/swiftbuild
yimajo
0
220
S3 を使うアプリケーションをローカル完結で動かすことに全力を注いでみた / Running S3 Apps Offline
contour_gara
0
570
SlackアプリとLambdaの 連携を構築した話
pawn_4_s
1
130
freee が目指す データ マネジメント戦略 AI-Ready 時代を支える 攻めのガバナンスとは
freee
PRO
0
450
わからない話を追いかけたら、プログラミング言語を作る側にいた
ydah
3
530
AIを紡ぐPMのお話
swdtkuy
0
120
Featured
See All Featured
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
550
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
260
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
Product Roadmaps are Hard
iamctodd
55
12k
Everyday Curiosity
cassininazir
0
290
Done Done
chrislema
186
16k
Build your cross-platform service in a week with App Engine
jlugia
234
19k
Optimising Largest Contentful Paint
csswizardry
37
3.9k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
270
Building AI with AI
inesmontani
PRO
1
1.1k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
870
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
1k
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