readFrom()
Function
readFrom<T>(subject$:
BehaviorSubject
<T
>):Read
<T
>
Create a new Read reading the state of a BehaviorSubject:
ts
const subjectState$: Read<string> = readFrom(behaviorSubject);
Source: lib/read-from.ts:17
Type parameters
Parameter | Description |
---|---|
T | state used by the target |
Parameters
Parameter | Type | Description |
---|---|---|
subject$ | BehaviorSubject <T > | Query or BehaviorSubject to select from |
Returns
Read
<T
>
Returns a new Read that emits the state of the BehaviorSubject