911mateo911 / requestIdleCallback-example

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Example of using the amazing browser API requestIdleCallback.

you can play with the timeout values on the app.tsx files and check the console how are the callbacks re ordered

its a great api for side effects like some unimporant logger on your app or something like analitycs where you need to track user clicks, its great

event react uses it under the hood to schedule rerenders

the bad thing is that it cant be polyfilled

About


Languages

Language:TypeScript 53.3%Language:HTML 24.0%Language:CSS 12.9%Language:JavaScript 9.8%