Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
redux-towerでルーティングを制する
Search
Yuki Kodama
February 07, 2017
Technology
2.8k
4
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
redux-towerでルーティングを制する
Yuki Kodama
February 07, 2017
More Decks by Yuki Kodama
See All by Yuki Kodama
エージェント開発におけるObservability
kuy
0
73
マイクロフロントエンドの現状確認
kuy
0
550
Reason
kuy
1
2.5k
Should I use redux-saga or not?
kuy
2
4.8k
redux-sagaで副作用をコントロールする
kuy
4
1.7k
Rails+webpackの落ち穂拾い
kuy
0
1.9k
なぜReduxを使うのか
kuy
25
12k
意地でもReduxを使う
kuy
1
620
Other Decks in Technology
See All in Technology
Vue.jsのGitHubから学ぶ意思決定
yut0naga1_fa
1
320
国際カードブランドルール変更に伴うクレジットカード決済取引仕様変更について
k1style
0
250
クラウドエージェントの先駆け Devin。今も最先端を走る、他との違い
kinopeee
1
490
Claude Codeから見る、エンジニアの世界の変容とその先
oikon48
7
4.6k
reInvent2026stby LT00 "Change your life!"
shinichirokawano
1
400
cdk deployとcdkd deploy、実際にデプロイして5倍速近くの差を実測した
yama3133
1
110
Let's Change Our World—Again
snoozer05
PRO
6
710
「作れる」と「リリースできる」の間にあったもの── PdMを外して見えた、PdMがやるべき仕事/Buildable ≠ Shippable: What Removing the PM Taught Me About the PM’s Job
yappli_developers
0
340
2026-10-24 JAWS JAWS-UG 茨城 #18 IAM Policy Autopilotってなにさ。terraform planからIAM Policyつくれるの? / What's IAM Policy Autopilot
masasuzu
0
180
AWS Continuum for Penetration Testing に Deep Dive してみる
asanoharuki
2
1.4k
DevelopersIO 2026 Tokyo 現時点の衛星通信サービスの現状を整理してみる
maroon1st
0
320
ポケモン対戦を自動で記録して振り返ろう
fufufukakaka
0
410
Featured
See All Featured
Un-Boring Meetings
codingconduct
0
470
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
1
470
SEO for Brand Visibility & Recognition
aleyda
0
4.8k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.9k
Chasing Engaging Ingredients in Design
codingconduct
0
370
Agile that works and the tools we love
rasmusluckow
331
22k
Visualization
eitanlees
153
17k
Designing Powerful Visuals for Engaging Learning
tmiket
1
620
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
460
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
4
4.4k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
530
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.9k
Transcript
redux-tower でルーティングを制する @kuy / Yuki Kodama 2017.02.07 @ Meguro.es #8
自己紹介 @kuy (カイ) / Yuki Kodama 株式会社ジャパンベンチャーリサーチ(新橋 → 恵比寿) entrepedia(アントレペディア)の開発・運用
AWS, Ruby on Rails, JavaScript (React+Redux+Saga) • redux-sagaでルーティングを制する • redux-sagaで非同期処理と戦う • Reduxでコンポーネントを再利用する • ・・・など Qiita の記事
redux-tower というのは・・・ • redux-saga を使ったルーティングライブラリ • ルートがアクティブになってからコンポーネントを表示するまでのロジックを Saga で書く →
フルコントロール可能 ◦ データの読み込み、認証、フォーム内容が変更されていたらページ遷移をブ ロック、途中でリダイレクト、...etc • ルート定義は JSON(JSX は使わない) ◦ ネスト可能、Entering/Leavingフック、省略記法 • SSR は未対応(試してすらいない・・・) ◦ 自分が SSR やってないだけなので PR 歓迎! リポジトリ https://github.com/kuy/redux-tower
ルート定義 #1 ルート定義 ルートアクション (Saga) パス + =
ルート定義 #2 ReduxのStateからログイン状態を取得して、未ログインのときのみログイ ンページにリダイレクト
ルート定義 #3 ログイン処理の結果を待って、成功したときは管理ページ、失敗したときは ログインページにリダイレクト
仕組み #1 • redux-sagaとルートアクションの間に入るProxy Generator ◦ redux-tower 自体も redux-saga で動く
Saga の1つにすぎない • redux-saga ↔ redux-tower ↔ ルートアクション ◦ パスの変更を検出してルート定義とのマッチング ◦ ルートアクションもただのGeneratorなのでnext()呼び出してyieldされ た値を取り出す ◦ 省略記法のときだけSagaのEffectに変換したり、特別な処理 ◦ あとはredux-sagaに丸投げ
仕組み #2 通常のSagaのEffectだった場合(callとかtakeとか)
仕組み #3 React コンポーネントが yield された場合(省略記法)
今後 • セットアップの簡素化 • Leavingフックの改善 • スクロール位置の復元 • バグ直さないと・・・ •
明日、redux-towerを使った社内向けシステムの管理画面リリース • 1.0 リリース ◦ その前にまずは 0.1.0 リリース
ブログアプリのデモ http://kuy.github.io/redux-tower/blog/
yield call(say(“ Thank you !! ”));