Created
October 14, 2017 17:59
-
-
Save pomber/58c4b8fddd13f9ab2e59559526bdb091 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 completeWork(fiber) { | |
if (fiber.tag == CLASS_COMPONENT) { | |
fiber.stateNode.__fiber = fiber; | |
} | |
if (fiber.parent) { | |
const childEffects = fiber.effects || []; | |
const thisEffect = fiber.effectTag != null ? [fiber] : []; | |
const parentEffects = fiber.parent.effects || []; | |
fiber.parent.effects = parentEffects.concat(childEffects, thisEffect); | |
} else { | |
pendingCommit = fiber; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment