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

Function updateClassComponent

bundle.js:7371–7377  ·  view source on GitHub ↗
(current,workInProgress,priorityLevel)

Source from the content-addressed store, hash-verified

7369// It used to be here.
7370}var unmaskedContext=getUnmaskedContext$1(workInProgress);var context=getMaskedContext$1(workInProgress,unmaskedContext);var nextChildren;{ReactCurrentOwner$2.current=workInProgress;ReactDebugCurrentFiber$4.setCurrentFiber(workInProgress,'render');nextChildren=fn(nextProps,context);ReactDebugCurrentFiber$4.setCurrentFiber(workInProgress,null);}// React DevTools reads this flag.
7371workInProgress.effectTag|=PerformedWork$1;reconcileChildren(current,workInProgress,nextChildren);memoizeProps(workInProgress,nextProps);return workInProgress.child;}function updateClassComponent(current,workInProgress,priorityLevel){// Push context providers early to prevent context stack mismatches.
7372// During mounting we don't know the child context yet as the instance doesn't exist.
7373// We will invalidate the child context in finishClassComponent() right after rendering.
7374var hasContext=pushContextProvider$1(workInProgress);var shouldUpdate=void 0;if(current===null){if(!workInProgress.stateNode){// In the initial pass we might need to construct the instance.
7375constructClassInstance(workInProgress,workInProgress.pendingProps);mountClassInstance(workInProgress,priorityLevel);shouldUpdate=true;}else{invariant(false,'Resuming work not yet implemented.');// In a resume, we'll already have an instance we can reuse.
7376// shouldUpdate = resumeMountClassInstance(workInProgress, priorityLevel);
7377}}else{shouldUpdate=updateClassInstance(current,workInProgress,priorityLevel);}return finishClassComponent(current,workInProgress,shouldUpdate,hasContext);}function finishClassComponent(current,workInProgress,shouldUpdate,hasContext){// Refs should update even if shouldComponentUpdate returns false
7378markRef(current,workInProgress);if(!shouldUpdate){// Context providers should defer to sCU for rendering
7379if(hasContext){invalidateContextProvider$1(workInProgress,false);}return bailoutOnAlreadyFinishedWork(current,workInProgress);}var instance=workInProgress.stateNode;// Rerender
7380ReactCurrentOwner$2.current=workInProgress;var nextChildren=void 0;{ReactDebugCurrentFiber$4.setCurrentFiber(workInProgress,'render');nextChildren=instance.render();ReactDebugCurrentFiber$4.setCurrentFiber(workInProgress,null);}// React DevTools reads this flag.

Callers 1

beginWorkFunction · 0.85

Calls 5

constructClassInstanceFunction · 0.85
mountClassInstanceFunction · 0.85
updateClassInstanceFunction · 0.85
finishClassComponentFunction · 0.85
invariantFunction · 0.70

Tested by

no test coverage detected