{ case ActionTypes.ADD_USER: { return adapter.addOne(action.payload.user, state); } case ActionTypes.ADD_USERS: { return adapter.addMany(action.payload.users, state); } case ActionTypes.UPDATE_USER: { return adapter.updateOne(action.payload.user, state); } case ActionTypes.UPDATE_USERS: { return adapter.updateMany(action.payload.users, state); } case ActionTypes.DELETE_USER: { return adapter.removeOne(action.payload.id, state); } case ActionTypes.DELETE_USERS: { return adapter.removeMany(action.payload.ids, state); } // ... } } @ngrx/entity とは? Storeの管理でありがちなEntity操作を提供してくれるモジュール 基本的なCRUD操作をライブラリで提供してくれる