In this session, we look at the typical Imperative way of:
creating a subscription,
adding the actual observable,
creating a local variable to update when the subscription gets data,
on top of it the limitation and ""freeze"" of the component if the strategy is changed to Onpush
and unsubscribing onDestroy if we follow best practices
All of the above can nicely be taken care of with the Declarative syntax of the Async Pipe, but we will look at why it works by debugging the actual class within the Angular source code. We will also look at something that is not often shared in tutorials online on how to deal and handle AsyncPipe errors both in a good way and in the best way.
We will tie in a hands-on exercise for people to convert a few subscriptions from Imperative to Declarative.
Watch video This Is Why You Need To [Always] Use The Async Pipe online without registration, duration hours minute second in high quality. This video was added by user Angular Kenya 30 June 2022, don't forget to share it with your friends and acquaintances, it has been viewed on our site 734 once and liked it 30 people.