Rx.Subject.never() and Rx.Subject.empty() in rxjs7 #6916
milahu
started this conversation in
Report issues other than bug
Replies: 1 comment 1 reply
-
Not sure why would you need it.... But an empty subject is just const subject = new Subject();
subject.complete();
// subject will now immediately complete when a new subscriber joins And a "never" subject is just const subject = new Subject();
// subject will never emit as long as you don't call `.next()` on it. The concept of empty and never only applies for Observables. It doesn't really make sense to have a "never" subject, as a subject is both an observer and an observable. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
static methods like
never
orempty
are deprecated/removed in rxjs7Rx.NEVER
andRx.EMPTY
are typeofObservable
how should i create
empty Subject
andnever Subject
?api docs
stackoverflow
real code
Beta Was this translation helpful? Give feedback.
All reactions