Skip to content

Instantly share code, notes, and snippets.

@pomber
Last active October 8, 2017 19:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pomber/81ebf8ace5a91980ec98fe55a6c55572 to your computer and use it in GitHub Desktop.
Save pomber/81ebf8ace5a91980ec98fe55a6c55572 to your computer and use it in GitHub Desktop.
Didact fiber data structure
let fiber = {
tag: HOST_COMPONENT,
type: "div",
parent: parentFiber,
child: childFiber,
sibling: null,
alternate: currentFiber,
stateNode: document.createElement("div"),
props: { children: [], className: "foo"},
partialState: null,
effectTag: PLACEMENT,
effects: []
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment