News for hackers. Stuff that matters.
Re:Is ReactJS really fast? by drapper on Monday June 01, 2015 @11:40AM (#9639461)
When I was using Angular I thought doing something like

  setTimeout(function() { $scope.$digest(); }, 0);
was an ugly hack and a sign of angular's leaky abstractionism showing up. Is this considered a good practice now (or always was)?

Edit: just to clarify, I'm asking because in OP this was given as a one of the way to fix Angular speed issues.

Re:Is ReactJS really fast? by timruffles on Monday June 01, 2015 @11:50AM (#9639573)
That's a sign someone has fundamentally misunderstood Angular and is hacking around their misunderstanding.
Re:Is ReactJS really fast? by dmak on Monday June 01, 2015 @12:30PM (#9639936)
Why do you say that? What about it makes it fundamentally misunderstanding?
Re:Is ReactJS really fast? by aikah on Monday June 01, 2015 @07:23PM (#9642894)
You should never have to use $scope.digest() unless you're testing a directive. You should never have to fire a digest loop manually.
Re:Is ReactJS really fast? by dmak on Monday June 01, 2015 @12:30PM (#9639930)
It's the same thing as using $timeout; It runs a digest at the end after a setTimeout. I wouldn't call it a good practice, but it wouldn't bother me either if I saw it in a codebase. You are also welcome to use things like $evalAsync.
Re:Is ReactJS really fast? by lucisferre on Monday June 01, 2015 @12:56PM (#9640175)
It's not the same thing, as the author points out since using `$timeout` in the example without an isolate scope was the source of the original problem. Instead he's suggesting you use $timeout without it's default behaviour (something that's possible now through the false argument or by calling setTimeout directly).

This is absolutely a leaky abstraction, and whether or not it's necessary sometimes when using Angular, it should still bother you.

Re:Is ReactJS really fast? by jsprogrammer on Monday June 01, 2015 @11:45AM (#9639520)
No.