4

According to RFC3 signal-based components with change detection strategy based fully on signals are planned as next thing to be released. So as of now, with zone-based change detection strategy, is there any sense of using signals over the traditional way of setting values to class' properties? Will signals' dependency tree eg. gain performance in zone-based components?

Matthieu Riegler
  • 31,918
  • 20
  • 95
  • 134
ThaFog
  • 493
  • 3
  • 15
  • 2
    Sure, why not if [signals boost performance, helps write clean reactive code, and makes debugging easier.](https://www.angulararchitects.io/aktuelles/angular-signals/) Developers need to adapt to the evolving features of the frameworks. Otherwise what used to be the norm will become obsolete. – Deepak D May 06 '23 at 02:22

1 Answers1

4

The answer today is : it depends.

The signals themselves are implemented but are still a developer preview, so expect breaking changes in the APIs without the angular team providing migration support.

The developer preview is here to gather the maximum feedback to finalize the API.

Also there is one important implementation detail. Signals are still hooked to the "old" change detection mecanisms. Updating the value of signal will trigger internally the same code as markForCheck. The same as effect(() => {}) is hooked on ApplicationRef.tick() + detectChanges().

So there are no perfermance advantages right now to use Signals. But there will be in the future. We're not here yet at real zone-less apps. This will like come with the signal components !

If you want to learn how it works, yeah go for it, get on the train ! But I wouldn't implement it today in an enterprise world.

Matthieu Riegler
  • 31,918
  • 20
  • 95
  • 134