React 通过dom获取fiber
源码目录:react/packages/react-dom/src/client/ReactDOMComponentTree.js
const randomKey = Math.random()
.toString(36)
.slice(2);
const internalInstanceKey = '__reactInternalInstance$' + randomKey;
export function precacheFiberNode(hostInst, node) {
node[internalInstanceKey] = hostInst;
}
因此dom对象上存储的fiber的属性名是__reactInternalInstance$开头的随机字符串