Photo by Matt Lee on Unsplash

Many times I encounter a question about how to handle async properties in Ember. I saw a lot of solutions like overwriting property after promise will resolve or handling promise in a template using special helpers. But there is also another, much simpler way!

You can use PromiseProxyMixin + ObjectProxy (or ArrayProxy if needed).

Example usage:

Instead of resolving a promise inside of our property:

viewCount: computed('articleId', function() {
return this.fetchArticleStats(this.articleId).then((stats) => {
return stats.viewCount;
});
}).readOnly(),

We are creating ObjectPromiseProxy using PromiseProxyMixin inside of our async property.

articleStats: computed('articleId', function() {
let promise = this.fetchArticleStats(this.articleId);
return ObjectPromiseProxy.create({ …


Photo by Alexandre Debiève on Unsplash

Before you start:
Make sure you are already familiar with components patterns

Ember.js is a framework that uses a lot of patterns and is conventions oriented. Fortunately, it’s also flexible. A lot of things depend clearly on developers, what sometimes can bring unexpected consequences. Very often fixing those issues is not an easy thing, and can change our mind about Ember because of its limitations. The truth is, hacks are not going in pair with conventions.

One of the first places where developers make this kind of mistake are components. They start to build their projects by adding new blocks…


As an Ember developer, you are probably familiar with components. Thanks to them you can split your code into meaningful parts. Unfortunately, it’s not always obvious how they should look like, and which pattern should you use. This snippet should let you better understand what kind of components patterns you can use to be the best match for your case.

Here are all the components patterns I found in the Ember community, that I think is good to know.

Components patterns

Photo by Joshua Hoehne on Unsplash

This is the basic type of component. It used for presenting, formatting data. It takes some properties and displays them in…


As you know sometimes tests may make as headaches and in many cases you wrote It right, so where the problem can be placed? Many of them are in CSS.

Wait!… Did you say in CSS?

Exactly there! When you are testing a DOM of your application, in many cases you are using jQuery to interact through elements. It is a good idea but what if your designer like a fluid design with many animations, transition, etc.?

It takes some time to show up an element and you do not always predict what time He need.


Napewno juz dobrze wiesz, że warto trzymać backup swoich danych w chmurze. Pomijając kwestie bezpieczeństwa i politykę dostawcy zgodzisz się ze mną, że jest to idealny sposób by przechowywać tam również twoje osobiste zdjęcia. Bardzo często mają one dla nas wartość większą niż telefon, aparat czy dysk twardy, dlatego decydujemy się na odważny krok jakim się chmura.

Jeżeli korzystasz z systemu iOS na pewno znasz już iCloud. Obecnie największą zaletą tego rozwiązania jest możliwość przechowywania zdjęć Live Photo. Dla niektórych może to być argument nie do pod ważenia, ponieważ nie znajdą tego u konkurencji.

Niestety wadą oczywiście jest 5GB darmowej…

Maciej Kwaśniak

Ember.js Expert | Hire me!

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store