Audit asynchronous APIs for zoneless compatibility
When migrating the library to zoneless change detection, we should review every usage of setTimeout and requestAnimationFrame.
Unlike applications using Zone.js, zoneless change detection is not automatically triggered after these callbacks execute. Each occurrence should be evaluated to determine whether it:
- requires an explicit change detection trigger,
- is safe to leave as-is because it does not affect the view.
setTimeout
requestAnimationFrame
Other APIs to review
While setTimeout and requestAnimationFrame are the most common cases, it is also worth reviewing usages of:
Audit asynchronous APIs for zoneless compatibility
When migrating the library to zoneless change detection, we should review every usage of
setTimeoutandrequestAnimationFrame.Unlike applications using Zone.js, zoneless change detection is not automatically triggered after these callbacks execute. Each occurrence should be evaluated to determine whether it:
setTimeoutrequestAnimationFrameOther APIs to review
While
setTimeoutandrequestAnimationFrameare the most common cases, it is also worth reviewing usages of:setIntervalqueueMicrotaskPromise.then()/async/awaitcallbacks that update component staterequestIdleCallbackResizeObserverMutationObserverIntersectionObserveraddEventListener)