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

Function updateContainer

dash/deps/react-dom@18.3.1.js:28857–28912  ·  view source on GitHub ↗
(element, container, parentComponent, callback)

Source from the content-addressed store, hash-verified

28855 return root;
28856 }
28857 function updateContainer(element, container, parentComponent, callback) {
28858 {
28859 onScheduleRoot(container, element);
28860 }
28861
28862 var current$1 = container.current;
28863 var eventTime = requestEventTime();
28864 var lane = requestUpdateLane(current$1);
28865
28866 {
28867 markRenderScheduled(lane);
28868 }
28869
28870 var context = getContextForSubtree(parentComponent);
28871
28872 if (container.context === null) {
28873 container.context = context;
28874 } else {
28875 container.pendingContext = context;
28876 }
28877
28878 {
28879 if (isRendering && current !== null && !didWarnAboutNestedUpdates) {
28880 didWarnAboutNestedUpdates = true;
28881
28882 error('Render methods should be a pure function of props and state; ' + 'triggering nested component updates from render is not allowed. ' + 'If necessary, trigger nested updates in componentDidUpdate.\n\n' + 'Check the render method of %s.', getComponentNameFromFiber(current) || 'Unknown');
28883 }
28884 }
28885
28886 var update = createUpdate(eventTime, lane); // Caution: React DevTools currently depends on this property
28887 // being called "element".
28888
28889 update.payload = {
28890 element: element
28891 };
28892 callback = callback === undefined ? null : callback;
28893
28894 if (callback !== null) {
28895 {
28896 if (typeof callback !== 'function') {
28897 error('render(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callback);
28898 }
28899 }
28900
28901 update.callback = callback;
28902 }
28903
28904 var root = enqueueUpdate(current$1, update, lane);
28905
28906 if (root !== null) {
28907 scheduleUpdateOnFiber(root, current$1, lane, eventTime);
28908 entangleTransitions(root, current$1, lane);
28909 }
28910
28911 return lane;
28912 }
28913 function getPublicRootInstance(container) {
28914 var containerFiber = container.current;

Callers 4

scheduleRootFunction · 0.70

Calls 11

onScheduleRootFunction · 0.70
requestEventTimeFunction · 0.70
requestUpdateLaneFunction · 0.70
markRenderScheduledFunction · 0.70
getContextForSubtreeFunction · 0.70
errorFunction · 0.70
createUpdateFunction · 0.70
enqueueUpdateFunction · 0.70
scheduleUpdateOnFiberFunction · 0.70
entangleTransitionsFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…