(fiber, nextInstance)
| 12097 | } |
| 12098 | |
| 12099 | function tryHydrate(fiber, nextInstance) { |
| 12100 | switch (fiber.tag) { |
| 12101 | case HostComponent: |
| 12102 | { |
| 12103 | var type = fiber.type; |
| 12104 | var props = fiber.pendingProps; |
| 12105 | var instance = canHydrateInstance(nextInstance, type, props); |
| 12106 | if (instance !== null) { |
| 12107 | fiber.stateNode = instance; |
| 12108 | return true; |
| 12109 | } |
| 12110 | return false; |
| 12111 | } |
| 12112 | case HostText: |
| 12113 | { |
| 12114 | var text = fiber.pendingProps; |
| 12115 | var textInstance = canHydrateTextInstance(nextInstance, text); |
| 12116 | if (textInstance !== null) { |
| 12117 | fiber.stateNode = textInstance; |
| 12118 | return true; |
| 12119 | } |
| 12120 | return false; |
| 12121 | } |
| 12122 | default: |
| 12123 | return false; |
| 12124 | } |
| 12125 | } |
| 12126 | |
| 12127 | function tryToClaimNextHydratableInstance(fiber) { |
| 12128 | if (!isHydrating) { |
no outgoing calls
no test coverage detected