DEV Community

Cover image for Angular Signals

Posted on • Updated on


Angular Signals

Angular Framework's Signals is a new reactive mechanism that allows components to share data without the need for explicit bindings. Signals are zero-argument functions that return a value, and they can be used to create observable data streams. When a signal is changed, all of the components that are subscribed to it will be notified of the change. This makes signals a powerful tool for decoupling components and making your application more reactive.

    This addition will roll out in Angular 16
    Current @latest stable is Angular 15
Enter fullscreen mode Exit fullscreen mode

Here are some of the benefits of using Angular Framework Signals:

Decoupling components: Signals can be used to decouple components from each other. This means that components can share data without having to be directly connected to each other. This makes your application more modular and easier to maintain.
Making your application more reactive: Signals can be used to make your application more reactive. This means that components will be able to react to changes in data in real time. This can improve the user experience of your application.
Making your application more efficient: Signals can be used to make your application more efficient. This is because they only notify components that are subscribed to them of changes. This can reduce the number of updates that your application needs to perform.

This is a good way to decouple components, make your application more reactive, and make your application more efficient. It is expected to roll out with Angular 16.

many thanks to Enea Jahollari @eneajaho


Top comments (9)

ivanivanyuk1993 profile image
Ivan Ivanyuk

Added comment

If we don't preprocess function in computed at compile-time or use some form of reflection to atomically notify only affected signals, won't it require O(n) change checks, where n is a quantity of signals in application, effectively making it have same algorithmic complexity as ChangeDetectionStrategy.Default and making it harmful for angular ecosystem?(with signals there will be 2 ways to run change detection in O(n), using signals or ChangeDetectionStrategy.Default(which is simpler to do than signals), and 1 way to run change detection in ~O(1) - using rxjs and async pipe)

sloan profile image
Sloan the DEV Moderator

Hey, this article seems like it may have been generated with the assistance of ChatGPT.

We allow our community members to use AI assistance when writing articles as long as they abide by our guidelines. Could you review the guidelines and edit your post to add a disclaimer?

Some comments may only be visible to logged-in visitors. Sign in to view all comments.