...

/

Example of Selectors

Example of Selectors

Let's explore how we can use Selector to access the information from the state store.

What is the Selector?


The Selector allows us to get information for the State store without having to return the entire store.


Selectors are pure functions in NgRx, similar to Reducers.

NgRx helper functions

NgRx provides two helper functions: createSelector() and createFeatureSelector()

createFeatureSelector() method

The createFeatureSelector() method gets the feature state (the state of a feature module),

createSelector() method

The createSelector() method returns a selection of ...