When Should We (NOT) Use a Signal effect()?
Автор: Deborah Kurata
Загружено: 2024-12-04
Просмотров: 8746
Описание:
"An effect is an operation that runs whenever one or more signal values change." Does that mean we should use it anytime we want to react to changes in a signal?
Angular v19 includes changes to effect, and introduces several additional signal features. Does that change the guidance?
In this video, we walk through several scenarios, examining an effect() based approach and an alternate approach. Then we look at the version 19 changes to the effect() function and summarize suggested guidelines.
Links
Code: https://stackblitz.com/~/edit/effect-...
YouTube video: "Angular Signals: What? Why? and How?": • Angular Signals: What? Why? and How?
YouTube video: "First Look at Angular's new linkedSignal()": • First Look at Angular's new linkedSignal()
YouTube video: "First Look at Angular's new resource() and rxResource()": • First Look at Angular's new resource() and...
Angular Team Blog: "Latest updates to effect() in Angular": https://blog.angular.dev/latest-updat...
Documentation: "Effects" guide: https://angular.dev/guide/signals#eff...
Documentation: "effect" reference documentation: https://angular.dev/api/core/effect
Content
00:00 effect()
00:39 effect() vs computed()
02:38 effect() vs linkedSignal()
04:34 effect() vs rxResource()
06:34 effect() and logging
07:06 Changes to effect() in v19
08:34 Recommendation for using effect()
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
😊About Me
Hey! I'm Deborah Kurata
I'm a software developer and YouTube content creator. I speak at conferences such as VSLive and ng-conf. I write articles for freeCodeCamp. And I'm a Pluralsight author with courses in the top 10 most popular (out of 7,000+) for over 5 years. For my work in support of software developers, I've been recognized with the Microsoft Most Valuable Professional (MVP) award, and I'm a Google Developer Expert (GDE).
View my YouTube content: / @deborah_kurata
Contact me on Twitter: @DeborahKurata
Or on Bluesky: @deborahkurata.bsky.social
Find my Pluralsight courses: https://www.pluralsight.com/profile/a...
Access my freeCodeCamp articles: https://www.freecodecamp.org/news/aut...
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
#angular
#angularsignals
#angularstatemanagementwithsignals
#angularstatemanagement
#angulartutorials
#angularforbeginners
#angularbestpractices
#effect
#computed
#linkedSignal
#resource
#rxresource
#angularv19
Повторяем попытку...

Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: