import { Container } from '../react-dom/ReactDomRoot' ; import { ReactNodeList } from '../shared/ReactTypes' ; import { createFiberRoot } from './ReactFiberRoot' ; import { requestEventTime , requestUpdateLane , scheduleUpdateOnFiber , } from './ReactFiberWorkLoop' ; import { Fiber , FiberRoot } from './ReactInternalTypes' ; import { RootTag } from './ReactRootTags' ; import { createUpdate , enqueueUpdate } from './ReactUpdateQueue' ; import { discreteUpdates , batchedEventUpdates } from './ReactFiberWorkLoop' ; param containerInfo param tag returns export const createContainer = ( containerInfo , tag ) : FiberRoot => { return createFiberRoot ( containerInfo , tag ) ; } ; param element param container export const updateContainer = ( element , container ) => { const current = container . current ; const eventTime = requestEventTime ( ) ; const lane = requestUpdateLane ( current ) ; const update = createUpdate ( ) ; update . payload = { element } ; enqueueUpdate ( current , update ) ; /**
     * 调度该fiber节点上的更新
     */ scheduleUpdateOnFiber ( current , lane , eventTime ) ; } ; export { discreteUpdates , batchedEventUpdates } ;