( container: OpaqueRoot, )
| 471 | }; |
| 472 | |
| 473 | export function getPublicRootInstance( |
| 474 | container: OpaqueRoot, |
| 475 | ): component(...props: any) | PublicInstance | null { |
| 476 | const containerFiber = container.current; |
| 477 | if (!containerFiber.child) { |
| 478 | return null; |
| 479 | } |
| 480 | switch (containerFiber.child.tag) { |
| 481 | case HostSingleton: |
| 482 | case HostComponent: |
| 483 | return getPublicInstance(containerFiber.child.stateNode); |
| 484 | default: |
| 485 | return containerFiber.child.stateNode; |
| 486 | } |
| 487 | } |
| 488 | |
| 489 | export function attemptSynchronousHydration(fiber: Fiber): void { |
| 490 | switch (fiber.tag) { |
no test coverage detected