(fiber: FiberNode)
| 70 | }; |
| 71 | |
| 72 | export function commitUpdate(fiber: FiberNode) { |
| 73 | switch (fiber.tag) { |
| 74 | case HostText: |
| 75 | const text = fiber.memoizedProps?.content; |
| 76 | return commitTextUpdate(fiber.stateNode, text); |
| 77 | default: |
| 78 | if (__DEV__) { |
| 79 | console.warn('未实现的Update类型', fiber); |
| 80 | } |
| 81 | break; |
| 82 | } |
| 83 | } |
| 84 | |
| 85 | export function commitTextUpdate(textInstance: TextInstance, content: string) { |
| 86 | textInstance.text = content; |
nothing calls this directly
no test coverage detected