Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setTimeout or Ember.run.later #71

Closed
vikram-s-narayan opened this issue Sep 3, 2015 · 1 comment
Closed

setTimeout or Ember.run.later #71

vikram-s-narayan opened this issue Sep 3, 2015 · 1 comment

Comments

@vikram-s-narayan
Copy link

According to the documentation - http://emberjs.com/api/classes/Ember.run.html#method_later,

it is recommended to use Ember.run.later rather than setTimeout.

So on page 217, should it be "Ember.run.later(function() { ..." instead of "setTimeout(function() { ..."?

Edit: I also see this thread where some concerns have been expressed about run.later - emberjs/ember.js#3008 (comment))

So ... maybe it is still better to use setTimeout?

Thanks again ... The book truly rocks!

@balinterdi
Copy link
Collaborator

That's exactly the issue I ran into when developing an Ember app (you can even see my comment) and I'm thus wary of using Ember.run.later. That said, I might try it again today to see if the situation has improved but the code snippet in the book is totally temporary and only serves demo purposes so I would leave it as it is in order to not having to explain another concept.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants