An Ember addon to schedule work at different phases of app life cycle
This addon provides a way to defer work into different paint phases of the rendering process to get a faster First Meaningful Paint (FMP). It also helps to prioritize and coordinate when the paint happens for different parts of the page.
The `ember-app-scheduler` addon provides APIs to hook into the router to determine when to execute its defered work. It also provides a promise-based function, ``whenRouteIdle`, to allow you to control when specific work will execute. An example of `whenRouteIdle` can be seen below.
import Component from '@glimmer/component';
import { tracked } from '@glimmer/tracking';
import { whenRouteIdle } from 'ember-app-scheduler';
export default class WhenRouteIdle extends Component {
@tracked routeIdle = false;
constructor() {
super(...arguments);
whenRouteIdle().then(() => {
this.routeIdle = true;
});
}
}