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: https://www.reddit.com/r/theAngularCoder/
LinkedIn Group: https://www.linkedin.com/groups/13984152/
Facebook Page: https://www.facebook.com/theangularcoder/
Discord Community: https://discord.gg/5vhcHy7s

Personal:
Reddit: https://www.reddit.com/user/gouravgunjan/
Discord username: gouravgunjan#3168
Dev.to: https://dev.to/gourav_gunjan
LinkedIn Personal: https://www.linkedin.com/in/gouravgunjan/

=== 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
Категория
Other
Комментариев нет.
Kwork.ru - услуги фрилансеров от 500 руб.