Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Change detection in the world of Ivy

Change detection in the world of Ivy

Angular is changing, and with the upcoming release of Ivy, it becomes much leaner and dynamic than before.
But how the change detection mechanism should work in the world of ivy and dynamic components?

Join me for a live coding session to understand how change detection works, and how it will look like when Ivy will be released.

Eliran Eliassy

August 14, 2019
Tweet

More Decks by Eliran Eliassy

Other Decks in Technology

Transcript

  1. About mySelf • Experienced FE developer, specialised in B2C applications

    • Founder & developer @ e-square.io • Angular-IL & AngularUP conf CO-organiser • Writer for AngularInDepth
  2. What cause the change? Events - click, submit…. XHR -

    Fetching data from server Timers - setTimout(), setInterval()
  3. zone.fork({ name: 'loggerZone', onEnter: () => {console.log('start')}, onLeave: () =>

    {console.log('end')} }) .run(() => { foo(); setTimeout(() => doSomethimg(), 0); bar(); });
  4. And that’s exactly what Angular does… NgZone is a forked

    zone with additional APIs based on observable onMicrotaskEmpty(), onError()
  5. And How does it work? In Angular every Component have

    his own ChangeDetectionRef ChangeDetectionRef works on the DOM from top to bottom like a tree
  6. Summary Zone.js - automatic change detection Manual Change detection async

    pipe and markForCheck The future of Angular with zone less components