Change Detection, Immutability, OnPush Strategy in Angular (Tutorial)

Надежный VDS
3 Просмотры
Поддержите сайт и поделитесь материалом в соц.сетях:

With live code, let's understand how change detection works in Angular, what is immutability and how we can leverage onPush strategy.

With the advent of Redux, immutable update patterns have become widely popular. In a nutshell, the idea is to create a new object instead of altering the existing one when you need to perform an update action. When it comes to Angular applications, the immutability term is mostly mentioned when you deal with the OnPush change detection strategy in order to improve a runtime performance.

However, sticking to mutable update patterns may not only prevent you from taking advantage of narrowing a components tree subjected to the change detection process, but it also leads to some hard to spot bugs/gotchas.

Please like, share and subscribe for more content like this. You can follow me and directly ask questions on:

Groups and Pages:
Reddit Community:
LinkedIn Group:
Facebook Page:
Discord Community:

Discord username: gouravgunjan#3168
LinkedIn Personal:

=== Chapters ===
00:00 - Intro
00:50 - Change Detection (layman)
03:18 - Immutability
04:33 - Live Code - Bad example
10:30 - What happens with OnPush
12:21 - Fixing code for OnPush
14:12 - Fix for initial bug
15:59 - Conclusion
Комментариев нет. - услуги фрилансеров от 500 руб.