Angular Signals
What you need to know
Tran Nguyen - 04/11/2023
1
v16
Agenda
2
What is Signals?
3
Why not continue with zone.js?
4
OnDefault
OnPush
Have you ever wondered…
5
Are we going to have another change detection strategy?
6
❤️
7
Signals
That’s the problem Signals solve for us
What is Signals
8
Signals
+
What is Signals
A variable + change notification
9
Observed
Update
Notify
dependents
Always
has a value
Synchronous
Example
10
How it works
11
signal<T>(initialValue: T): WritableSignal<T>
12
Signals and Change detection OnPush
13
14
Does Signal give us any benefit over OnPush Strategy?
15
Should we remove zone.JS?
16
🤜🤛
Signals
Behaviour Subject
17
18
👉 Observable
DEMO
This demo will answer those questions:
19