(fiber: FiberNode)
| 482 | } |
| 483 | |
| 484 | function getHostParent(fiber: FiberNode): Container | null { |
| 485 | let parent = fiber.return; |
| 486 | |
| 487 | while (parent) { |
| 488 | const parentTag = parent.tag; |
| 489 | // HostComponent HostRoot |
| 490 | if (parentTag === HostComponent) { |
| 491 | return parent.stateNode as Container; |
| 492 | } |
| 493 | if (parentTag === HostRoot) { |
| 494 | return (parent.stateNode as FiberRootNode).container; |
| 495 | } |
| 496 | parent = parent.return; |
| 497 | } |
| 498 | if (__DEV__) { |
| 499 | console.warn('未找到host parent'); |
| 500 | } |
| 501 | return null; |
| 502 | } |
| 503 | |
| 504 | function insertOrAppendPlacementNodeIntoContainer( |
| 505 | finishedWork: FiberNode, |
no outgoing calls
no test coverage detected