Summary
This chapter took a deep dive into Angular Signals. We started by figuring out why Signals exist and how they help manage data reactively.
Then, we explored the Signals API, from creating and reading the current value to using computed Signals and effects when the value changes.
Next, we compared Signals to RxJS Observables. We saw what each is good at and when you’d use one over the other. Angular even provides special interop functions that let Signals and Observables work together nicely, including toObservable()
and toSignals()
, both of which we discussed.
Finally, to put everything into practice, we used Signals in our recipe app to see how they work with RxJS in real-world scenarios. This hands-on experience helped us solidify what we learned about using Signals and RxJS together. We also walked through the newest improvements regarding reactive data binding and component interaction using Angular Signals.
By incorporating Angular Signals into your...