Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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