Angular is becoming more reactive with signals

Angular is becoming more reactive with signals

Signal is just a special type of variable that holds a value. But unlike other variables, a signal also provides notification when the variable value changes.


  1. A signal is a variable + change notification
  2. A signal is reactive, and is called a "reactive primitive"
  3. A signal always has a value


A signal is synchronous and is not a replacement for #RxJS and Observables for asynchronous operations, such as http.get


Where can we use signals?

  • 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.

要查看或添加评论,请登录

社区洞察

其他会员也浏览了