SIGNALS

Signals:

Signals is a system that tracks your states throughoout an application, allowing the framework to optimize rendering updates.

It is either Writable or read-only.
Writable Signals:
It provide an API for updating their values directly.we can create an writable signals by calling the signal function with the signals initial value:

const count =signal(0);
console.log('The count is :'+count());

to change the value we use .set() or .update()

count.set(3)

or 

count.update((value)=> value +1);

Comments

Popular posts from this blog

Angular Guides Notes

Directives