Matthias gives a brief overview of some of the common ways you'll use RxJS in your Angular applications. He discusses subscription management via the async pipe or for times when you manually subscribe, using the takeUntil operator. Additionally, he also shows how observable streams can be shared using the publishReplay operator.
Netanel put together a very clear example of an edit in place component. Beyond showing how to do it, he discusses the reasons that he chose his particular solution.
“Entities should be open for extension, but closed for modification.”
Or, in our case, components. When we say “closed for modification,” we mean we want to be able to change the behavior of a component without modifying that component’s source code. We should always strive to write code that doesn’t have to be changed every time the requirements change.
Are you counting on ngOnDestroy to execute any clean up logic in your code? You may be surprised to learn that in some cases, ngOnDestroy doesn't fire as expected. In this article, Wes gives his "hot tips" on how to use ngOnDestroy effectively in your apps to get the behavior you're expecting.
Now our ngOnDestroy method is called both when the component is destroyed by Angular AND when the browser event window:beforeunload is fired. This is a powerful combination!
If you've ever heard Brandon Roberts speak about NgRx, you know that he's famous for his BoilerPlate shout. Indeed, there is a fair amount of code required to set up your actions in NgRx. That is, until version 7.4.0 was released.
The new action creator dramatically improves developer ergonomics and makes working with NgRx actions a much more enjoyable experience.
The new Action Creator ticks all the boxes for me: it feels lighter, more concise, improves searchability and readability, helps to avoid payload and makes state management simpler.
NgRx’s example-app has already been updated with the new Action Creators, so don’t forget to check it out.
We've all been there... Looking for ways to defer the loading of images in your applications to improve initial page load performance.
Addy Osmani discusses the new implementation of lazy-loading images natively in the browser. Millions of lines of code are about to be rendered useless!