In this talk, we will go on a journey exploring how Angular change detection has evolved over the years and the impacts of Signals on Angular and its reactivity model, the pros and cons, and what to expect in the future.
View = Function(state) - Detecting changes when they happen - User Actions - Button Clicks - Form Entries, etc - Browser API Changes - Browser Resizes - Scroll Events, etc.
For Changes - E.g. Angular Push-based Change Detection - Components alert the framework of changes - Renders immediately after change happens - E.g. React
change detection - Per view change-detection - Fine-grained reactivity - @Inputs, ViewChild Queries, Models will be signals - CD will only run when inputs are read - Optional Zone.js
No initial values - You need an async pipe to read values - Observables have side effects - HTTP Calls etc - Not pure functions - RxJS and Signals will work together - RxJS for Async Operations - Signals State Management and CD - Interoperability of Signals with RxJS - Provide initial values when subscribing to RxJS - May be - the end of Async Pipe in the future
Applications - Possible future benefits: - SSR and Hydrations - - Modern Hydration Techniques: - Resumability, - Progressive Enhancements, - Automatic Islands, etc. - Improvement Developer Experience - Hot Module Reloading Improvements in Angular - Mental Model Switch with Signals - Changes to Life Cycle Hooks - Effects - RxJS and Signals Interoperability - Functions in Templates, etc.