NgRx は Angular 用の Redux にインスパイアされた状態管理ライブラリです。アプリケーションの状態を単一の不変な store に集約し、RxJS に基づいた厳密で予測可能な単方向のデータフローを実現します。
コアピースとフロー
text
Component dispatches an ACTION →
REDUCER produces new state (pure function) →
STORE updates →
SELECTORS read state →
Component re-renders
(EFFECTS handle side effects like HTTP, dispatching new actions)
Actions — 何が起こったかを説明する
ts
{ createAction, props } ;
loadUsers = ();
loadUsersSuccess = (, props<{ : [] }>());
