Skip to content

Update和UpdateQueue对象

json
{
  // TODO: Temporary field. Will remove this by storing a map of
  // transition -> event time on the root.
  // 更新的过期时间
  eventTime: number,
  // 更新的优先级
  lane: Lane,
  
  // 更新对象的类型 State  	
  tag: 0 | 1 | 2 | 3,

  // 更新的内容 
  // { element }
  // 
  payload: any,

  // 对应的回调,`setState`,`render`都有
  callback: (() => mixed) | null,

  next: Update<State> | null,
}

eventTime: number

更新的过期时间

lane: Lane

更新的优先级

tag: State

  • 0 - UpdateState
  • 1 - ReplaceState
  • 2 - ForceUpdate
  • 3 - CaptureUpdate

updateQueue