Skip to content

Latest commit

 

History

History

updateContainer

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
  function updateContainer(element, container, parentComponent, callback) => {
    // 这里在初次渲染时 element是children container是root parentComponent是null
    let current = container.current // current就是RootFiber
    let currentTime = requestCurrentTime() // 这里得到的是到目前为止 react还能处理多少单位时间(1单位时间是10ms)
    let expirationTime = computeExpirationForFiber(currentTime, current)
    this.scheduleRootUpdate(current, element, expirationTime, callback)
  }