Tomas Trajan
1 min readJan 9, 2019

--

Hi Michael Karén!

Thanks! The thing is it depends. All the HttpClient calls like get or post will complete and unsubscribe after result value ( or error ) automatically so you don’t even have to use take(1) . On the other hand you can have some custom observable processing or let’s say websocket subscription which will not unsubscribe after first value.

In that case using take(1) for initialization would be helpful!

Cheers!

--

--

Tomas Trajan
Tomas Trajan

Written by Tomas Trajan

👋 I build, teach, write & speak about #Angular & #NgRx for enterprises 👨‍💻 Google Developer Expert #GDE 👨‍🏫 @AngularZurich meetup co-organizer

Responses (1)