Angular Addicts #22: Angular 17.1, Signal Inputs, State management tips & more
My favorite Angular resources of January, 2024
👋Hey fellow Angular Addict
The latest minor version of Angular, was released this month. Cédric Exbrayat summarizes the most important new features in his blog post:
Support for TypeScript 5.3
Inputs as Signals
Zoneless change detection (new private API)
Control flow migration
Angular CLI improvements
💎Angular Gems of January, 2024
Alexander Goncharuk suggests 11 rules to follow with "Avoid" and "Prefer" code snippets and detailed explanations:
Use dedicated tools for state management
Always prefer local state unless you have a good reason to use global state
Limit component code to view-related logic only
Always separate stateful and stateless services
Access state synchronously when it makes sense
Do not create "proxy methods" for no good reason
Remember to use multicasting observables returned by selectors
Use state management APIs, but do not limit yourself to them
Embrace pure functions and static methods
Make sure you handle errors in effects
Thanks for reading Angular Addicts! Subscribe for free to receive new posts and support my work.
Ryan Carniato takes a deep dive into the theory behind reactive systems, highlighting the distinctions between derivation and synchronization. He addresses the challenges of ensuring glitch-free consistency during state updates, and compares three approaches to reactivity: scheduling (pull), events (push) and signals (push-pull).
In his article, Rainer Hahnekamp covers testing techniques for the latest features of Angular:
How to mock services in a standalone component
How can we use
TestBed.runInInjectionContext()for unit testing code that uses the
RouterTestingHarnessto simplify the unit test of the routed components
One of the most interesting new features of Angular 17.1 is Signal Inputs. Kevin Kreuzer highlights the benefits of reactive inputs and the differences between the
computed signals and the
transform property of Signal Inputs. He also explains how required inputs and input aliasing work, demonstrates how to utilize router parameters with Signal Inputs and offers a simple method to trigger side effects when input changes occur.
👨💻About the author
My name is Gergely Szerovay, I work as a frontend development chapter lead. Teaching (and learning) Angular is one of my passions. I consume content related to Angular on a daily basis — articles, podcasts, conference talks, you name it.
I created the Angular Addict Newsletter so that I can send you the best resources I come across each month. Whether you are a seasoned Angular Addict or a beginner, I got you covered.
Next to the newsletter, I also have a publication called — you guessed it — Angular Addicts. It is a collection of the resources I find most informative and interesting. Let me know if you would like to be included as a writer.
Let’s learn Angular together! Subscribe here 🔥
If you missed the previous issues of the newsletter, you can read them here, these are the latest 3 issues:
📨 Submit your Angular resource
Have you found or written an interesting Angular-related article, tweet or other resource lately? Please let me know here in the comments or send me a DM on Twitter! I might feature it in the next Angular Addicts issue!