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

Function renderWithHooks

docs/index.js:7173–7202  ·  view source on GitHub ↗
(
  current,
  workInProgress,
  Component,
  props,
  secondArg,
  nextRenderLanes
)

Source from the content-addressed store, hash-verified

7171 return !0;
7172}
7173function renderWithHooks(
7174 current,
7175 workInProgress,
7176 Component,
7177 props,
7178 secondArg,
7179 nextRenderLanes
7180) {
7181 renderLanes = nextRenderLanes;
7182 currentlyRenderingFiber$1 = workInProgress;
7183 workInProgress.memoizedState = null;
7184 workInProgress.updateQueue = null;
7185 workInProgress.lanes = 0;
7186 ReactSharedInternals.H =
7187 null === current || null === current.memoizedState
7188 ? HooksDispatcherOnMount
7189 : HooksDispatcherOnUpdate;
7190 shouldDoubleInvokeUserFnsInHooksDEV = !1;
7191 nextRenderLanes = Component(props, secondArg);
7192 shouldDoubleInvokeUserFnsInHooksDEV = !1;
7193 didScheduleRenderPhaseUpdateDuringThisPass &&
7194 (nextRenderLanes = renderWithHooksAgain(
7195 workInProgress,
7196 Component,
7197 props,
7198 secondArg
7199 ));
7200 finishRenderingHooks(current);
7201 return nextRenderLanes;
7202}
7203function finishRenderingHooks(current) {
7204 ReactSharedInternals.H = ContextOnlyDispatcher;
7205 var didRenderTooFewHooks = null !== currentHook && null !== currentHook.next;

Callers 3

updateForwardRefFunction · 0.85
updateFunctionComponentFunction · 0.85
beginWorkFunction · 0.85

Calls 5

ComponentFunction · 0.85
renderWithHooksAgainFunction · 0.85
finishRenderingHooksFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…