(fiber, nextInstance)
| 12348 | } |
| 12349 | |
| 12350 | function tryHydrate(fiber, nextInstance) { |
| 12351 | switch (fiber.tag) { |
| 12352 | case HostComponent: |
| 12353 | { |
| 12354 | var type = fiber.type; |
| 12355 | var props = fiber.pendingProps; |
| 12356 | var instance = canHydrateInstance(nextInstance, type, props); |
| 12357 | if (instance !== null) { |
| 12358 | fiber.stateNode = instance; |
| 12359 | return true; |
| 12360 | } |
| 12361 | return false; |
| 12362 | } |
| 12363 | case HostText: |
| 12364 | { |
| 12365 | var text = fiber.pendingProps; |
| 12366 | var textInstance = canHydrateTextInstance(nextInstance, text); |
| 12367 | if (textInstance !== null) { |
| 12368 | fiber.stateNode = textInstance; |
| 12369 | return true; |
| 12370 | } |
| 12371 | return false; |
| 12372 | } |
| 12373 | default: |
| 12374 | return false; |
| 12375 | } |
| 12376 | } |
| 12377 | |
| 12378 | function tryToClaimNextHydratableInstance(fiber) { |
| 12379 | if (!isHydrating) { |
no outgoing calls
no test coverage detected