Scheduling in React

Scheduling in React

The general purpose cooperative main thread scheduler is developed by the React Core team and makes it possible to register callbacks with different priority levels in the browser. Since the users of our app do not see this task, we can schedule a callback with an even lower priority for that:

If we now use in our search box component and take another look at the Performance tab with this change and scroll toward the end, we’ll see that our analytics are now sent after all rendering work has completed, and so all the tasks in our app are perfectly scheduled:

Try it out:

With the Scheduler, it’s possible to control in what order callbacks are executed. Concurrent React and the Scheduler allow us to implement scheduling of tasks in our applications which will allow us to create highly responsive user interfaces.

Source: philippspiess.com