MCPcopy Create free account
hub / github.com/caseywebdev/react-list / prepareToHydrateHostInstance

Function prepareToHydrateHostInstance

docs/index.js:6027–6099  ·  view source on GitHub ↗
(fiber)

Source from the content-addressed store, hash-verified

6025 throw HydrationMismatchException;
6026}
6027function prepareToHydrateHostInstance(fiber) {
6028 var instance = fiber.stateNode,
6029 type = fiber.type,
6030 props = fiber.memoizedProps;
6031 instance[internalInstanceKey] = fiber;
6032 instance[internalPropsKey] = props;
6033 switch (type) {
6034 case "dialog":
6035 listenToNonDelegatedEvent("cancel", instance);
6036 listenToNonDelegatedEvent("close", instance);
6037 break;
6038 case "iframe":
6039 case "object":
6040 case "embed":
6041 listenToNonDelegatedEvent("load", instance);
6042 break;
6043 case "video":
6044 case "audio":
6045 for (type = 0; type < mediaEventTypes.length; type++)
6046 listenToNonDelegatedEvent(mediaEventTypes[type], instance);
6047 break;
6048 case "source":
6049 listenToNonDelegatedEvent("error", instance);
6050 break;
6051 case "img":
6052 case "image":
6053 case "link":
6054 listenToNonDelegatedEvent("error", instance);
6055 listenToNonDelegatedEvent("load", instance);
6056 break;
6057 case "details":
6058 listenToNonDelegatedEvent("toggle", instance);
6059 break;
6060 case "input":
6061 listenToNonDelegatedEvent("invalid", instance);
6062 initInput(
6063 instance,
6064 props.value,
6065 props.defaultValue,
6066 props.checked,
6067 props.defaultChecked,
6068 props.type,
6069 props.name,
6070 !0
6071 );
6072 track(instance);
6073 break;
6074 case "select":
6075 listenToNonDelegatedEvent("invalid", instance);
6076 break;
6077 case "textarea":
6078 listenToNonDelegatedEvent("invalid", instance),
6079 initTextarea(instance, props.value, props.defaultValue, props.children),
6080 track(instance);
6081 }
6082 type = props.children;
6083 ("string" !== typeof type &&
6084 "number" !== typeof type &&

Callers 1

completeWorkFunction · 0.85

Calls 12

initInputFunction · 0.85
trackFunction · 0.85
initTextareaFunction · 0.85
checkForUnmatchedTextFunction · 0.85
throwOnHydrationMismatchFunction · 0.85
validateInputPropsFunction · 0.85
validateOptionPropsFunction · 0.85
validateSelectPropsFunction · 0.85
validateTextareaPropsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…