Skip to content

Commit 0bb23fe

Browse files
Peter B Smithbrandonroberts
Peter B Smith
authored andcommitted
docs(data): update refs to EntityReducerFactory (#2127)
Closes #2126
1 parent 0b2ec9c commit 0bb23fe

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

projects/ngrx.io/content/guide/data/entity-reducer.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ The _Entity Reducer_ is the _master reducer_ for all entity collections in the s
55
<a id="reducer-factory"></a>
66

77
The library doesn't have a named _entity reducer_ type.
8-
Rather it relies on the **`EntityReducerFactory.create()`** method to produce that reducer,
8+
Rather it relies on the **`EntityCacheReducerFactory.create()`** method to produce that reducer,
99
which is an _NgRx_ `ActionReducer<EntityCache, EntityAction>`.
1010

1111
Such a reducer function takes an `EntityCache` state and an `EntityAction` action
@@ -35,7 +35,7 @@ The _entity reducer's_ primary job is to
3535
An `EntityCollectionReducer` applies _actions_ to an `EntityCollection` in the `EntityCache` held in the _NgRx store_.
3636

3737
There is always a reducer for a given entity type.
38-
The `EntityReducerFactory` maintains a registry of them.
38+
The `EntityCollectionReducerFactory` maintains a registry of them.
3939
If it can't find a reducer for the entity type, it [creates one](#collection-reducer-factory), with the help
4040
of the injected `EntityCollectionReducerFactory`, and registers that reducer
4141
so it can use it again next time.
@@ -45,10 +45,10 @@ so it can use it again next time.
4545
### Register custom reducers
4646

4747
You can create a custom reducer for an entity type and
48-
register it directly with `EntityReducerFactory.registerReducer()`.
48+
register it directly with `EntityCollectionReducerRegistry.registerReducer()`.
4949

5050
You can register several custom reducers at the same time
51-
by calling `EntityReducerFactory.registerReducer(reducerMap)` where
51+
by calling `EntityCollectionReducerRegistry.registerReducer(reducerMap)` where
5252
the `reducerMap` is a hash of reducers, keyed by _entity-type-name_.
5353

5454
<a id="collection-reducer-factory"></a>
@@ -91,7 +91,7 @@ The `NgRxDataModule` adds an empty `EntityCache` to the NgRx Data store.
9191
There are no collections in this cache.
9292

9393
If the master `EntityReducer` can't find a collection for the _action_'s entity type,
94-
it creates a new, initialized collection with the help of the `EntityCollectionCreator`, which was injected into the `EntityReducerFactory`.
94+
it creates a new, initialized collection with the help of the `EntityCollectionCreator`, which was injected into the `EntityCacheReducerFactory`.
9595

9696
The _creator_ returns an initialized collection from the `initialState` in the entity's `EntityDefinition`.
9797
If the entity type doesn't have a _definition_ or the definition doesn't have an `initialState` property value,
@@ -109,7 +109,7 @@ You can _replace_ the default _entity reducer_ by
109109
providing a custom alternative to the [`EntityCollectionReducerFactory`](#collection-reducer-factory).
110110

111111
You could even _replace_ the master _entity reducer_ by
112-
providing a custom alternative to the [`EntityReducerFactory`](#reducer-factory).
112+
providing a custom alternative to the [`EntityCacheReducerFactory`](#reducer-factory).
113113

114114
But quite often you'd like to extend a _collection reducer_ with some additional reducer logic that runs before or after.
115115

@@ -247,7 +247,7 @@ add them to an array.
247247
Provide this array with the `ENTITY_COLLECTION_META_REDUCERS` injection token
248248
where you import the `NgRxDataModule`.
249249

250-
The `EntityReducerFactory` injects it and composes the
250+
The `EntityCollectionReducerRegistry` injects it and composes the
251251
array of _MetaReducers_ into a single _meta-MetaReducer_.
252252
The earlier _MetaReducers_ wrap the later ones in the array.
253253

projects/ngrx.io/content/guide/data/extension-points.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Or you can keep the entity type in the NgRx Data system and take over the behavi
2424

2525
* Create supplemental actions for that type. Give them custom `op` names that suit your purpose.
2626

27-
* Register an alternative `EntityCollectionReducer` for that type with the `EntityReducerFactory`. Your custom reducer can respond to your custom actions and implement the standard operations in its own way.
27+
* Register an alternative `EntityCollectionReducer` for that type with the `EntityCollectionReducerFactory`. Your custom reducer can respond to your custom actions and implement the standard operations in its own way.
2828

2929
* Create your own service facade, an alternative to `EntityCollectionService`, that dispatches the actions you care about
3030
and exposes the selectors that your type needs.

0 commit comments

Comments
 (0)