-
Notifications
You must be signed in to change notification settings - Fork 0
Angular ‐ Signals
FullstackCodingGuy edited this page Feb 13, 2024
·
4 revisions
- Signals are a new feature that tracks changes in a variable’s value and notifies us reactively when a change occurs.
- Signals provide a new way to capture when a variable undergoes a data change, making the code more reactive
- A signal is a variable + change notification
- A signal is reactive, and is called a "reactive primitive"
- A signal always has a value
- A signal is synchronous
- A signal is not a replacement for RxJS and Observables for asynchronous operations, such as http.get
- Use them in components to track local component state
- Use them in directives
- Use them in a service to share state across components
- Read them in a template to display signal values
- Or use them anywhere else in your code