no-zone-critical-browser-apis
Detects all scheduling APIs (
setTimeout
,setInterval
,requestAnimationFrame
).
Rationale
Zone patched scheduling APIs might be overused and cause unnecessary change detection runs.
Examples
❌ Examples of incorrect code for this rule
setTimeout(() => {
console.log('hello');
}, 0);
✅ Examples of correct code for this rule
import { setTimeout } from '@rx-angular/cdk/zone-less';
setTimeout(() => {
console.log('hello');
}, 0);