Reducer: 純粹的函數,接收目前狀态,以及最新的action,計算出最新的action.
selector: 純函數,用于select,derive和compose pieces of state
Store和State的差別
State is accessed with the store, an observable of state and an observer of actions.
Store是state和action的Observable.
reducer第一次被系統調用:@ngrx/store/update-reducers:
type:@ngrx/store/update-reducers
store也是一個Observable:
store的source字段裡,根據feature名稱example找到state初始值0: