Last active
August 14, 2019 14:31
-
-
Save Tevinthuku/d0f17ef7ab3be58fd2a485d58cfbdfe6 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
const HOST_ROOT = "root"; | |
const HOST_COMPONENT = "host"; | |
// code.. | |
export function render(elements, containerDom) { | |
workQueue.push({ | |
from: HOST_ROOT, // the root/parent fiber | |
dom: containerDom, // document.getElementById("app") just a dom node where this fiber will be appended to as a child | |
newProps: { children: elements } | |
}); | |
requestIdleCallback(performWork); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment