Skip to content

Latest commit

 

History

History
36 lines (23 loc) · 698 Bytes

术语笔记.md

File metadata and controls

36 lines (23 loc) · 698 Bytes

fiber

  • fiber 类型 hostRoot hostComponent(真实dom节点) hostText(文本节点) classComponent (class) provider consumer
  • 等等 这些fiber 类型

将root 推到链表 里面 执行work的时候

创建每个 update 都有不同的操作类型

update 类型
export const UpdateState = 0;  // 更新
export const ReplaceState = 1; // 替换
export const ForceUpdate = 2; // 
export const CaptureUpdate = 3
export type Update<State> = {
 expirationTime: ExpirationTime,

 tag: 0 | 1 | 2 | 3,
 payload: any,
 callback: (() => mixed) | null,

 next: Update<State> | null,
 nextEffect: Update<State> | null,
};