is there something like `BehaviorSubject` but wher...
# rx
i
is there something like
BehaviorSubject
but where the value is not optional?
k
You mean a default value?
Copy code
BehaviorSubject.createDefault(1)
i
I mean, that I can call
value
on it and it returns the value, not an optional @kioba
k
ahh, I don’t know any Subject that a non optional value. Behaviour subject can extended with a property which throws exceptions or returns a default value in case of missing
null
. Altho it works, Wouldn’t suggest the value usage. Sometimes i comes handy but on a longer terms it is a bad decision. Try to subscribe to the stream instead