#64 Promise Proxy Mixin

Tip

Guest Tip by Devin Weaver
Ember comes with a built in helper that will provide computed properties for the status of an asynchronous task.

Pros

Built in – no need for an addon.
Can be managed in the life cycle of a component.
Provides convenient state properties that can drive the template logic.
Cons

Must be wrapped in an Ember.Object and cannot be applied to an Ember.Component directly.
Creates a disconnect between the original promise chain and the destructing of the content value.
Is not very intuitive and can be difficult to reason with.
Cannot be cancelled.

JavaScript

Template

Credits & Links

Guest post by Devin Weaver
Website https://tritarget.org/
sukima on Twitter https://twitter.com/sukima
sukima on GitHub https://github.com/sukima
sukima on Keybase https://keybase.io/sukima
Answer on StackOverflow by Devin – http://stackoverflow.com/documentation/ember.js/1054/asynchronous-tasks-in-components/3399/promiseproxymixin#t=201608101635295267817

My Latest Side Project

Hire JS - Top Javascript Developers
Hire JS – Top Javascript Developers

Hey guys, I am working on a new project (built with ember of course). Please take a look at it and let me know what you think. I would greatly appreciate it if you signup and create a profile as well. Thank you and I hope I can help you will find your next ember project 🙂

Share A Tip

Email me at emad@emberdaily.tips if you have a good ember tip.
If you are enjoying my daily tips please spread the word with this one-click tweet.
If you do NOT like the tips then please reply to this email and let me know how I can improve them.

Published by

Emad Ibrahim

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