MCPcopy Create free account
hub / github.com/danielstocks/react-sortable / canHydrate

Function canHydrate

bundle.js:7637–7637  ·  view source on GitHub ↗
(fiber,nextInstance)

Source from the content-addressed store, hash-verified

7635// parentInstance = returnFiber.stateNode.containerInfo;
7636// break;
7637case HostComponent$10:parentInstance=returnFiber.stateNode;break;default:return;}switch(fiber.tag){case HostComponent$10:var type=fiber.type;var props=fiber.pendingProps;didNotFindHydratableInstance(parentInstance,type,props);break;case HostText$8:var text=fiber.pendingProps;didNotFindHydratableTextInstance(parentInstance,text);break;}}}function canHydrate(fiber,nextInstance){switch(fiber.tag){case HostComponent$10:{var type=fiber.type;var props=fiber.pendingProps;return canHydrateInstance(nextInstance,type,props);}case HostText$8:{var text=fiber.pendingProps;return canHydrateTextInstance(nextInstance,text);}default:return false;}}function tryToClaimNextHydratableInstance(fiber){if(!isHydrating){return;}var nextInstance=nextHydratableInstance;if(!nextInstance){// Nothing to hydrate. Make it an insertion.
7638insertNonHydratedInstance(hydrationParentFiber,fiber);isHydrating=false;hydrationParentFiber=fiber;return;}if(!canHydrate(fiber,nextInstance)){// If we can't hydrate this instance let's try the next one.
7639// We use this as a heuristic. It's based on intuition and not data so it
7640// might be flawed or unnecessary.

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected