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
Better async redux saga
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Kushan Joshi
June 28, 2017
Technology
730
1
Share
Better async redux saga
Slides on Generator Functions and Redux Saga
Kushan Joshi
June 28, 2017
Other Decks in Technology
See All in Technology
The 7 pitfalls of AI
ufried
0
130
独断と偏見で試してみる、 シングル or マルチエージェント どっちがいいの?
shichijoyuhi
1
220
Percolatorを廃止し、マルチ検索サービスへ刷新した話 / Search Engineering Tech Talk 2026 Spring
visional_engineering_and_design
0
220
GitHub Copilot CLI と VS Code Agent Mode の使い分け
tomokusaba
0
110
AIが自律的に働く時代へ Amazon Quick で実現するAIエージェント紹介
koheiyoshikawa
0
160
AI와 협업하는 조직으로의 여정
arawn
0
560
Agents CLI と Gemini Enterprise Agent Platform で マルチエージェント開発が楽しくなる!
kaz1437
0
190
今年注目する!データ分析プラットフォームでのAIの活用
nayuts
0
170
AWS Transform CustomでIaCコードを自由自在に変換しよう
duelist2020jp
0
220
[Oracle TechNight#99] 生成AI時代のAI/ML入門 ~ AIとオラクルデータベースの関係 (前半)
oracle4engineer
PRO
1
130
Anthropic「Long-running a gents」をGeminiで再現してみた
tkikuchi
0
740
FessのAI検索モード:検索システムとLLMへの取り組み
marevol
0
150
Featured
See All Featured
We Have a Design System, Now What?
morganepeng
55
8.1k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.1k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
320
What does AI have to do with Human Rights?
axbom
PRO
1
2.1k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
199
73k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
170
Odyssey Design
rkendrick25
PRO
2
580
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
270
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.4k
WCS-LA-2024
lcolladotor
0
560
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
220
Transcript
GENERATORS REDUX SAGA & Kushan Joshi
KUSHAN JOSHI Mapbox OpenStreetMap @kushan2020
GENERATORS What are Generator Functions ? Are functions that can
hold state They can be paused / resumed on demand.
GENERATORS Unlike functions, Generator functions do not run to completion
"
GENERATORS Should I run?
GENERATORS EXAMPLE
GENERATORS EXAMPLE
GENERATORS EXAMPLE
GENERATORS EXAMPLE is called an iterator
ITERABLE
ITERABLE
ITERABLE
GENERATORS Built in iterables Array, String, Map, Set, TypedArray
GENERATORS EXAMPLE
GENERATORS EXAMPLE
GENERATORS EXAMPLE
GENERATORS EXAMPLE
GENERATORS EXAMPLE
GENERATORS EXAMPLE
GENERATORS EXAMPLE
GENERATORS What are generators, again ? Give you a nice
way to generate an Iterator
GENERATORS Great! Let us look at Redux
REDUX PROBLEM Store ✈ Action
REDUX PROBLEM Store ✈ ✈ ✈ ✈ ✈ Actions
REDUX PROBLEM Store Async Actions? Async-Action
REDUX PROBLEM Store There are a lot of tools to
solve this problem. Async-Action
REDUX PROBLEM Store There are a lot of tools to
solve this problem. Async-Action
REDUX PROBLEM Store There are a lot of tools to
solve this problem. Async-Action
REDUX PROBLEM Store There are a lot of tools to
solve this problem. Async-Action
REDUX PROBLEM Store There are a lot of tools to
solve this problem. Async-Action
REDUX PROBLEM Store There are a lot of tools to
solve this problem. Async-Action
REDUX PROBLEM Store There are a lot of tools to
solve this problem. Async-Action
REDUX PROBLEM Store There are a lot of tools to
solve this problem. Async-Action
REDUX PROBLEM Store There are a lot of tools to
solve this problem. Async-Action
REDUX PROBLEM Store There are a lot of tools to
solve this problem. Async-Action
REDUX PROBLEM Store There are a lot of tools to
solve this problem. Async-Action
REDUX PROBLEM Store There are a lot of tools to
solve this problem. Async-Action
REDUX PROBLEM Store Async-Action Easy bro!
REDUX PROBLEM Store Async-Action One of them is Redux Saga
REDUX SAGA Is a library which helps manage async actions
with generators. 5 Redux Saga
REDUX SAGA It runs the generator functions for you.
It gives you helper functions to interact with Redux
REDUX SAGA ✈
REDUX SAGA ✈
REDUX SAGA
REDUX SAGA
GENERATORS How does it compare with Redux Thunks Nice!
REDUX THUNKS LOGIN WITH THUNKS
REDUX THUNKS LOGIN WITH THUNKS
REDUX THUNKS LOGIN WITH THUNKS
REDUX THUNKS LOGIN WITH THUNKS
SAGA LOGIN WITH SAGA
SAGA LOGIN WITH SAGA
SAGA LOGIN WITH SAGA
SAGA LOGIN WITH SAGA
SAGA LOGIN WITH SAGA
SAGA LOGIN WITH SAGA
THUNKS FEATURE PARITY WITH THUNKS
GENERATORS Isn’t this just too complex for a login
THUNKS
THUNKS FEATURE PARITY WITH THUNKS
NETWORK RACE
NETWORK RACE
NETWORK RACE
NETWORK RACE
SAGA LOGIN WITH SAGA
SAGA LOGIN WITH SAGA
SAGA LOGIN WITH SAGA ✈ Logout!
SAGA LOGIN WITH SAGA Me?
SAGA LOGIN WITH SAGA
SAGA LOGIN WITH SAGA
SAGA LOGIN WITH SAGA
SAGA LOGIN WITH SAGA
SAGA LOGIN WITH SAGA
GENERATORS Can’t you just use Async / Await and be
happy?
SAGA ASYNC AWAIT IMPLEMENTATION OF REDUX SAGA
SAGA ASYNC AWAIT IMPLEMENTATION OF REDUX SAGA
GENERATORS So, are generators useless?
GENERATORS The whole point of generators is that you can
manipulate them while they are suspended.
GENERATORS Think of it as a conversation between the code
that runs the generator and the generator itself. Generator Redux Saga (runner)
GENERATORS Generator Redux Saga (runner)
GENERATORS Generator Redux Saga (runner)
GENERATORS Generator Redux Saga (runner)
GENERATORS Generator Redux Saga (runner)
GENERATORS Generator Redux Saga (runner)
GENERATORS Generator Redux Saga (runner)
GENERATORS Async or any other magical being Redux Saga (runner)
GENERATORS ? Async or any other magical being Redux Saga
(runner)
GENERATORS Which is why it is so easy to test
a redux saga, at every yield @
REDUX SAGA TESTING
REDUX SAGA TESTING
REDUX SAGA TESTING
REDUX SAGA TAKE AWAYS Generator functions are fun Redux Saga
is an amazing solution to the async action problem
REDUX SAGA THANK YOU
REDUX SAGA TAKEAWAY
REDUX SAGA TAKEAWAY
REDUX SAGA TAKEAWAY
REDUX SAGA TAKEAWAY