Select State
#
Reactive Selecttodo-feature-store.ts
select
takes a callback function which gives you access to the current feature state (see the state
parameter).
Within that function you can pick a specific piece of state.
select
returns an Observable which will emit as soon as the selected state changes.
#
Memoized SelectorsYou can use memoized selectors also with the Feature Store...
You only have to omit the feature key when using createFeatureSelector
.
This is because the Feature Store is operating on a specific feature state already
(the corresponding feature key has been provided in the constructor).
todo-feature-store.ts