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
NgRx v8を使ってみよう
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
puku0x
September 11, 2019
Technology
1
1.2k
NgRx v8を使ってみよう
https://ng-fukuoka.connpass.com/event/144382/
puku0x
September 11, 2019
Tweet
Share
More Decks by puku0x
See All by puku0x
Agent Skills 入門
puku0x
0
1.5k
ファインディにおけるフロントエンド技術選定の歴史
puku0x
2
1.9k
生成AIではじめるテスト駆動開発
puku0x
0
1k
実践!カスタムインストラクション&スラッシュコマンド
puku0x
2
3k
Nx × AI によるモノレポ活用 〜コードジェネレーター編〜
puku0x
0
1.5k
ファインディにおけるフロントエンド技術選定の歴史
puku0x
2
290
ファインディでのGitHub Actions活用事例
puku0x
9
3.7k
Findyの開発生産性向上への取り組み ~Findyフロントエンドの場合~
puku0x
0
470
Findyの開発生産性を上げるためにやったこと
puku0x
1
650
Other Decks in Technology
See All in Technology
JAWSDAYS2026_A-6_現場SEが語る 回せるセキュリティ運用~設計で可視化、AIで加速する「楽に回る」運用設計のコツ~
shoki_hata
0
3k
JAWS DAYS 2026 楽しく学ぼう!ストレージ 入門
yoshiki0705
2
180
決済サービスを支えるElastic Cloud - Elastic Cloudの導入と推進、決済サービスのObservability
suzukij
2
630
「Blue Team Labs Online」入門 - みんなで挑むログ解析バトル
v_avenger
0
170
マルチプレーンGPUネットワークを実現するシャッフルアーキテクチャの整理と考察
markunet
2
240
進化するBits AI SREと私と組織
nulabinc
PRO
0
150
複数クラスタ運用と検索の高度化:ビズリーチにおけるElastic活用事例 / ElasticON Tokyo2026
visional_engineering_and_design
0
150
JAWSDAYS2026 [C02] 楽しく学ぼう!AWSとは?AWSの歴史 入門
hiragahh
0
150
SRE NEXT 2026 CfP レビュアーが語る聞きたくなるプロポーザルとは?
yutakawasaki0911
1
300
JAWS FESTA 2025でリリースしたほぼリアルタイム文字起こし/翻訳機能の構成について
naoki8408
1
470
The_Evolution_of_Bits_AI_SRE.pdf
nulabinc
PRO
0
190
Exadata Database Service on Dedicated Infrastructure(ExaDB-D) UI スクリーン・キャプチャ集
oracle4engineer
PRO
8
7.2k
Featured
See All Featured
The Illustrated Children's Guide to Kubernetes
chrisshort
51
52k
Prompt Engineering for Job Search
mfonobong
0
180
Heart Work Chapter 1 - Part 1
lfama
PRO
5
35k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
300
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
Practical Orchestrator
shlominoach
191
11k
A Tale of Four Properties
chriscoyier
163
24k
The Cost Of JavaScript in 2023
addyosmani
55
9.8k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
140
Documentation Writing (for coders)
carmenintech
77
5.3k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
310
Facilitating Awesome Meetings
lara
57
6.8k
Transcript
NgRx v8を使ってみよう Angularもくもく会 in Fukuoka #9
Noriyuki Shinpuku ng-fukuoka organizer VEGA corporation Co., Ltd. @puku0x
Angular
Full-fledged & opinionated Angular Protractor Forms PWA Augury Language Services
Router Elements CDK Universal Karma Labs Compiler i18n Http Material Animations CLI
State management?
RxJS
Basic state management • BehaviorSubject • ReplaySubject ◦ No initial
value ◦ No current value getter
BehaviorSubject import { Injectable } from '@angular/core'; import { BehaviorSubject
} from 'rxjs'; @Injectable({ providedIn: 'root' }) export class CouterService { private counter = new BehaviorSubject(0); // Initial value = 0 get counter$() { return this.counter.asObservable(); } increment() { const value = this.counter.getValue(); this.counter.next(value + 1); } }
ReplaySubject import { Injectable } from '@angular/core'; import { BehaviorSubject
} from 'rxjs'; @Injectable({ providedIn: 'root' }) export class CouterService { private counter = new ReplaySubject(1); // Buffer size = 1 get counter$() { return this.counter.asObservable(); } setCounter(value: number) { this.counter.next(value); } }
Complex state management?
None
NgRx • RxJS powered Redux for Angular • Type-safe and
performant • Community driven
None
Does it have many boilerplates?
NgRx v8 has less boilerplates!
https://blog.angularindepth.com/ngrx-action-creators-redesigned-d396960e46da
Action creator factory import { createAction, props } from '@ngrx/store';
export const increment = createAction( '[Counter] Increment' ); export const setValue = createAction( '[Counter] Set value, props<{ value: number }>() );
Reducer creator factory import { createReducer, on } from '@ngrx/store';
import { increment, setValue } from './counter.actions'; export const initialState = 0; const counterReducer = createReducer(initialState, on(increment, state => state + 1), // No more switch-case! on(setValue, (state, { value }) => value) );
Effect creator factory import { Actions, ofType, createEffect } from
'@ngrx/effects'; import { tap } from 'rxjs/operators'; import { setValue } from '../actions'; @Injectable() export class CounterEffects { constructor(private actions$: Actionn) {} setValue$ = createEffect(() => // No more @Effect decorator! this.actions$.pipe( ofType(setValue), tap(({ value }) => console.log(`${value}`)) ), { dispatch: false } );
Creator factories make NgRx simple!
Recap • NgRx provides Redux for Angular • Less boilerplate
with creator factories • Try it now! https://ngrx.io/ https://stackblitz.com/edit/ngrx-todo-v8
Thank you! @puku0x Noriyuki Shinpuku