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

Function applyDerivedStateFromProps

docs/index.js:8559–8574  ·  view source on GitHub ↗
(
  workInProgress,
  ctor,
  getDerivedStateFromProps,
  nextProps
)

Source from the content-addressed store, hash-verified

8557 return [passthrough, hook.queue.dispatch];
8558};
8559function applyDerivedStateFromProps(
8560 workInProgress,
8561 ctor,
8562 getDerivedStateFromProps,
8563 nextProps
8564) {
8565 ctor = workInProgress.memoizedState;
8566 getDerivedStateFromProps = getDerivedStateFromProps(nextProps, ctor);
8567 getDerivedStateFromProps =
8568 null === getDerivedStateFromProps || void 0 === getDerivedStateFromProps
8569 ? ctor
8570 : assign({}, ctor, getDerivedStateFromProps);
8571 workInProgress.memoizedState = getDerivedStateFromProps;
8572 0 === workInProgress.lanes &&
8573 (workInProgress.updateQueue.baseState = getDerivedStateFromProps);
8574}
8575var classComponentUpdater = {
8576 isMounted: function (component) {
8577 return (component = component._reactInternals)

Callers 1

updateClassComponentFunction · 0.85

Calls 2

getComponentNameFromTypeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…