| 7 | import { resolveType } from '../reconciler/resolver'; |
| 8 | |
| 9 | function getReactStack(instance) { |
| 10 | const rootNode = getInternalInstance(instance); |
| 11 | const stack = {}; |
| 12 | if (rootNode) { |
| 13 | // React stack |
| 14 | const isFiber = typeof rootNode.tag === 'number'; |
| 15 | if (isFiber) { |
| 16 | hydrateFiberStack(rootNode, stack); |
| 17 | } else { |
| 18 | hydrateLegacyStack(rootNode, stack); |
| 19 | } |
| 20 | } else { |
| 21 | // Non-React stack |
| 22 | // preact? // inferno? |
| 23 | // there is no known VDOM to get stack from |
| 24 | } |
| 25 | |
| 26 | return stack; |
| 27 | } |
| 28 | |
| 29 | const markUpdate = ({ fiber }) => { |
| 30 | // do not update what we should not |