Angular 17.1 introduces signal inputs, a reactive alternative to decorator-based @Input() inputs. Signal inputs enhance code quality and productivity through increased type safety, allowing for easier integration with Angular signals.
Signal inputs enable developers to respond effectively to input changes using signals, supporting optional and required inputs.
Compared to @Input(), signal inputs automatically mark OnPush components as dirty, improving DX and paving the way for Zoneless.
Signal inputs leverage the power of signals, enabling efficient monitoring of changes and value derivation while notifying Angular for necessary re-rendering.
Potential use cases include declaration and rendering, change monitoring, value derivation, and value transforms.
Signal inputs support transforms and aliasing, providing flexibility in handling raw values and meeting specific needs.
The Angular team recommends using signal inputs once they are promoted to production status in an upcoming version.
Developers are encouraged to provide feedback on signal inputs in developer preview.
The shorthand notation for input() may cause confusion due to the implicit use of undefined as the initial value.
Inputs are now read-only, potentially affecting applications that relied on updating inputs from within the component.
blog.angular.dev
blog.angular.dev
Create attached notes ...
