Very informative, I have been guilty of using "allowSignalWrites" in effects, at least I updated signals :) .. but I love the patterns you showed here.
As a side note, I just ported one of our internal applications to use signal inputs(), and it's so awesome. The best thing? ngOnChanges are now no more needed, effect() and computed() to the rescue. Awesome.
👋 I'm a Frontend enthusiast & full-stack aficionado | Crafting captivating user experiences | Based in Lisbon, Portugal 🇵🇹 | Dedicated to innovation and staying ahead with the latest in tech!
Senior Full-Stack Software Engineer with over 6 years of progressive experience in the full software development lifecycle. I specialize in building secure, scalable multi-tenant web platforms .
👨🏫 Co-Founder of This is Learning, Organizer of AarhusJS
✍️ Writer, Speaker, FOSS Maintainer 📗 Author
🏆 Microsoft MVP 🌟 GitHub Star
🌊 Nx Champion 🦸 Angular Hero of Education
However, doesn't this make the HTTP request side effect eager unless we use RxJS operators to guard against this? One thing you forgot is initializing the query signal with empty string ('') or another bottom value. The thing about signals is that they, like BehaviorSubjects alway must have a current value, causing the items signal and its built-in effect to immediately (well, after 500ms) kick off.
👨🏫 Co-Founder of This is Learning, Organizer of AarhusJS
✍️ Writer, Speaker, FOSS Maintainer 📗 Author
🏆 Microsoft MVP 🌟 GitHub Star
🌊 Nx Champion 🦸 Angular Hero of Education
Very informative, I have been guilty of using "allowSignalWrites" in effects, at least I updated signals :) .. but I love the patterns you showed here.
As a side note, I just ported one of our internal applications to use signal inputs(), and it's so awesome. The best thing? ngOnChanges are now no more needed, effect() and computed() to the rescue. Awesome.
NgOnChanges is really horrible to work with
Yes, signal inputs are clearly a superior approach! Totally agree. Thanks for appreciating the article :)
Informative Post well done keep it up
Regard
Danish Hafeez | QA Assistant
ictinnovations.com
Thanks for your appreciation!
Good article. Thanks.
Have recently upgraded to the latest Angular. Very excited to start working with Signal inputs!
Great to hear I have been of help to you!
Thanks for sharing!
Thank you for sharing.
Thank you for this amazing article, @armandotrue 👏
The toObservable-toSignal composition is elegant and it's the first time I've seen it.
However, doesn't this make the HTTP request side effect eager unless we use RxJS operators to guard against this? One thing you forgot is initializing the
querysignal with empty string ('') or another bottom value. The thing about signals is that they, likeBehaviorSubjects alway must have a current value, causing theitemssignal and its built-in effect to immediately (well, after 500ms) kick off.Do you have tips on the
allowSignalWriteseffect option, @armandotrue?Good article. Thanks))
Hi Armen Vardanyan,
Excellent content, very useful.
Thanks for sharing.
Thank you for sharing, Armen! Really useful.
Question about companyEmployees. How it will get updated if a company value is updated with selector for example and it is untracked?