Lesson

Execute code when the RxJS Observable terminates with the finalize operator

You know about the finally instruction in the try-catch? What if you wanted to have the same when using RxJS Observables? Surprise, there's actually an RxJS operator :wink: called finalize which can be used for exactly that. Let's explore in more details.

Duration
4 min
Access
Free
Transcript
Available

You know about the finally instruction in the try-catch? What if you wanted to have the same when using RxJS Observables? Surprise, there's actually an RxJS operator :wink: called finalize which can be used for exactly that. Let's explore in more details.