select
select
returns the state as cached and distinct Observable<A>
. Accepts arbitrary
rxjs operators to enrich the selection with reactive composition.
Example
const profilePicture$ = state.pipe(
select(
pluck('profilePicture'),
switchMap((profilePicture) => mapImageAsync(profilePicture))
)
);
Signature
function select<T, A>(op: OperatorFunction<T, A>): OperatorFunction<T, A>;