DEV Community

Cover image for Episode 23/22: Signal Components, TypeScript 5.1
ng-news for This is Angular

Posted on

Episode 23/22: Signal Components, TypeScript 5.1

Joshua Morony discusses Signal Components in Angular 17, highlighting benefits like fine-grained change detection and simplified input handling. TypeScript 5.1 is released, allowing the omission of return statements in functions returning undefined.

Signal Components with Joshua Morony

Joshua Morony, a highly regarded Angular YouTuber, recently released a video discussing Signal Components, a feature expected in Angular 17. These components serve a similar role for Signals as Standalone API does for Standalone Components, forming an integral part of the Signal story.

In his video, Joshua highlights four key benefits of Signal Components. Firstly, Signal components allow us to build applications without zone.js, enabling fine-grained change detection and reducing bundle size.

Furthermore, the new input function, replacing the @Input decorator, provides the value as a Signal, eliminating the need for NgOnChanges or RxJs patterns that rely on Subject for emitting input changes. Two-way binding also becomes more straightforward, as we can create a new value using a model function and immediately use it for two-way binding, removing the requirement for separate Input and Output properties. Additionally, traditional queries for ViewChild or ContentChild can be replaced with regular function calls.

Joshua's explanation makes it clear why many lifecycle hooks become boilerplate code when using Signal components.

TypeScript 5.1

TypeScript 5.1 has been released. The release model of TypeScript doesn't follow the schematic versioning where a major version comes with breaking changes and a minor one adds new features. In fact, given the quite TypeScript's crucial role, breaking changes are avoided at all costs.

Notably, TypeScript 5.1 introduces the ability to omit return statements in functions returning undefined. Previously, omitting return statements were only possible in functions returning void. This change aligns TypeScript with JavaScript's behaviour, as JavaScript always returns undefined during runtime.

Other changes were more in the area of JSX. So this release is more interesting for React developers rather than for us.

Minor Releases

We had new minor releases such as Nx 16.3, an alternative to Angular.

Nx 16.3 ChangeLog

And a CSS dinosaur, namely Bootstrap, was released in version 5.3.

Bootstrap 5.3.0 | Bootstrap Blog

It’s official, the final stable release of v5.3.0 has landed! It’s been a monumental effort to revamp our codebase for CSS variables and color modes, one that will see continued changes leading up to an eventual Bootstrap 6. And we’re so excited to finally ship it! On top of all the work that’s gone into this release, a lot has happened behind the scenes since we shipped our pre-releases. Keep reading to learn everything that’s new in v5.3.0.

favicon blog.getbootstrap.com

Top comments (0)