astoilkov / main-thread-scheduling

Fast and consistently responsive apps using a single function call
MIT License
1.29k stars 32 forks source link

Support for postTask scheduling? #5

Closed ScriptedAlchemy closed 2 years ago

ScriptedAlchemy commented 2 years ago

Hey no came across this article and though this would be a brilliant addition to your work.

Have any opinion on if or how this could fit into your project?

https://medium.com/airbnb-engineering/building-a-faster-web-experience-with-the-posttask-scheduler-276b83454e91

astoilkov commented 2 years ago

I've mentioned the scheduling API at the end of the in-depth document. The postTask scheduling is the future and when widely available I will adopt it and replace the current logic. The benefit of my approach (I think) is that it's super simple to use while postTask requires a little more effort and code restructuring.

astoilkov commented 2 years ago

I've updated the readme to include more information about the navigator.scheduling API that's coming in the future. I hope that helps people.

I am closing this issue. Thanks for the idea.