#78 Computed Decorators

I talked about the async/await stuff in tip 54, here is another one along the same lines of using a future language feature TODAY.

The decorator syntax is very cool and makes your code more readable and easier to write.

Here is how we do a computed property now:

With the decorator syntax, you can rewrite it like this:

That’s way more readable.

Note: Make sure you import computed

To make this happen, first, run:

Then edit your .ember-cli-build.js and add:

If this is not 100% clear, you can watch this free screencast and you can also read more about decorators at:

Published by

Emad Ibrahim

Author of asp .net MVC & TDD, entrepreneur, passionate technologist, programmer and productivity nut. more at http://t.co/oSJXPvzu