Learning the Ember run loop

The Ember run loop is an extremely important part of Ember's internals. The run loop is used to batch, order, and work in a way that's most efficient for the Ember application. In this recipe, we'll create a simple timer and take a look at how the run loop works.

Getting ready

Before we move on to our recipe, we'll need to understand some basics of the Ember run loop.

Understanding Ember run queues

The Ember run loop consists of six queues as follows:

  • sync: This queue consists of binding synchronization jobs.
  • actions: This queue contains general work and promises.
  • routerTransitions: This queue contains transition jobs in the router.
  • render: This queue contains jobs meant to render, usually to update the DOM.
  • afterRender: This ...

Get Ember.js Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.