Schedule

Render

beginWork

completeWork

Commit

beforeMutation

mutation

layout

Fiber tree

graph TD
  container["`DOM根节点 &ltdiv id='root'&gt`"]
  container ~~~ fiberRootNode[fiber rootNode]
  fiberRootNode -->|containerInfo| container
  fiberRootNode -->|current| hostFiber(host fiber)
  hostFiber -->|stateNode| fiberRootNode
  
  hostFiber -->|child| fiber1
  fiber1(["fiber1(App)"]) -->|return| hostFiber
  
  fiber1 -->|child| fiber2(["fiber2(div, span, MyComponent...)"])
  fiber2 -->|return| fiber1
  
  fiber2 -->|child| fiber3
  fiber3 -->|return| fiber2
  

	fiber3 -->|child| fiber4
	
	fiber4 & fiber5 & fiber6 -->|return| fiber3
	
	fiber4 -->|sbling| fiber5
	fiber5 -->|sbling| fiber6
	
	fiber3 ~~~ fiber4 & fiber5 & fiber6
	
	fiber5 & fiber6 ~~~ fiber7
	fiber5 -->|child| fiber7
	fiber7 -->|return| fiber5
	

  

Fiber 结构

tag

key

elementType

type

stateNode

return