4 ms·
Correct me if I'm wrong, but Fiber sounds like a micro tasker for React? Ember had been doing this for years through Backburner run loop
by lightblade 9y ago
Correct me if I'm wrong, but Fiber sounds like a micro tasker for React? Ember had been doing this for years through Backburner run loop
- danabramov 9y agoWith the ability to pause large updates in the middle without committing them to UI, doing some higher priority updates, and then "rebasing" lower priority updates on top of them and continuing the work. So it's a bit more sophisticated.
- lightblade 9y agoDoes Fiber yield control back to the js engine when doing the "rebasing"? Or are all of these synchronous in one frame?
- danabramov 9y agoYea, it does. We are using requestIdleCallback to do the work "while we can", and then yield the control back. Again, this won't be a part of React 16, but it's part of the bigger picture we are moving towards. Relevant code if you're curious: https://github.com/facebook/react/blob/233195cb6bc632ade61a8f64569b4d94061860d6/src/renderers/shared/fiber/ReactFiberScheduler.js#L815-L818 https://github.com/facebook/react/blob/233195cb6bc632ade61a8...
- lightblade 9y agoInteresting... Since requestIdleCallback leaves the scheduling out of your hand, how do you ensure nodes are still updated when you need it? Like tests?