The never
function from the rxjs
library creates an observable that does not emit anything and never completes.
You can import it from the library and use it like this:
index.tsx198 chars12 lines
The subscribe
method is called, but since never
does not emit anything and never completes, none of the callbacks are executed. This is useful when you need to create an observable that just waits for some external event to trigger something, but you want to handle the subscription before that event occurs.
gistlibby LogSnag