MCPcopy Create free account
hub / github.com/plotly/dash / createHydrationContainer

Function createHydrationContainer

dash/deps/react-dom@18.3.1.js:28836–28856  ·  view source on GitHub ↗
(initialChildren, // TODO: Remove `callback` when we delete legacy mode.
  callback, containerInfo, tag, hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, onRecoverableError, transitionCallbacks)

Source from the content-addressed store, hash-verified

28834 return createFiberRoot(containerInfo, tag, hydrate, initialChildren, hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, onRecoverableError);
28835 }
28836 function createHydrationContainer(initialChildren, // TODO: Remove `callback` when we delete legacy mode.
28837 callback, containerInfo, tag, hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, onRecoverableError, transitionCallbacks) {
28838 var hydrate = true;
28839 var root = createFiberRoot(containerInfo, tag, hydrate, initialChildren, hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, onRecoverableError); // TODO: Move this to FiberRoot constructor
28840
28841 root.context = getContextForSubtree(null); // Schedule the initial render. In a hydration root, this is different from
28842 // a regular update because the initial render must match was was rendered
28843 // on the server.
28844 // NOTE: This update intentionally doesn't have a payload. We're only using
28845 // the update to schedule work on the root fiber (and, for legacy roots, to
28846 // enqueue the callback if one is provided).
28847
28848 var current = root.current;
28849 var eventTime = requestEventTime();
28850 var lane = requestUpdateLane(current);
28851 var update = createUpdate(eventTime, lane);
28852 update.callback = callback !== undefined && callback !== null ? callback : null;
28853 enqueueUpdate(current, update, lane);
28854 scheduleInitialHydrationOnRoot(root, lane, eventTime);
28855 return root;
28856 }
28857 function updateContainer(element, container, parentComponent, callback) {
28858 {
28859 onScheduleRoot(container, element);

Callers 2

hydrateRootFunction · 0.70

Calls 7

createFiberRootFunction · 0.70
getContextForSubtreeFunction · 0.70
requestEventTimeFunction · 0.70
requestUpdateLaneFunction · 0.70
createUpdateFunction · 0.70
enqueueUpdateFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…