Created
October 13, 2017 21:18
-
-
Save pomber/0bc1c3c47dc1d4e79145d1e61bdfb25f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function performUnitOfWork(wipFiber) { | |
beginWork(wipFiber); | |
if (wipFiber.child) { | |
return wipFiber.child; | |
} | |
// No child, we call completeWork until we find a sibling | |
let uow = wipFiber; | |
while (uow) { | |
completeWork(uow); | |
if (uow.sibling) { | |
// Sibling needs to beginWork | |
return uow.sibling; | |
} | |
uow = uow.parent; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment