MCPcopy
hub / github.com/facebook/react / scheduleRoot

Function scheduleRoot

packages/react-reconciler/src/ReactFiberHotReloading.js:242–256  ·  view source on GitHub ↗
(
  root: FiberRoot,
  element: ReactNodeList,
)

Source from the content-addressed store, hash-verified

240};
241
242export const scheduleRoot: ScheduleRoot = (
243 root: FiberRoot,
244 element: ReactNodeList,
245): void => {
246 if (__DEV__) {
247 if (root.context !== emptyContextObject) {
248 // Super edge case: root has a legacy _renderSubtree context
249 // but we don't know the parentComponent so we can't pass it.
250 // Just ignore. We'll delete this with _renderSubtree code path later.
251 return;
252 }
253 updateContainerSync(element, root, null, null);
254 flushSyncWork();
255 }
256};
257
258function scheduleFibersWithFamiliesRecursively(
259 fiber: Fiber,

Callers

nothing calls this directly

Calls 2

updateContainerSyncFunction · 0.90
flushSyncWorkFunction · 0.90

Tested by

no test coverage detected