code stringlengths 24 2.07M | docstring stringlengths 25 85.3k | func_name stringlengths 1 92 | language stringclasses 1
value | repo stringlengths 5 64 | path stringlengths 4 172 | url stringlengths 44 218 | license stringclasses 7
values |
|---|---|---|---|---|---|---|---|
function tryToClaimNextHydratableInstance(fiber) {
if (!isHydrating) {
return;
}
var nextInstance = nextHydratableInstance;
if (!nextInstance) {
if (shouldClientRenderOnMismatch(fiber)) {
warnNonhydratedInstance(hydrationParentFiber, fiber);
throwOnHydrationMismatch();
... | Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding
DOM node. | tryToClaimNextHydratableInstance | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function prepareToHydrateHostInstance(fiber, rootContainerInstance, hostContext) {
var instance = fiber.stateNode;
var shouldWarnIfMismatchDev = !didSuspendOrErrorDEV;
var updatePayload = hydrateInstance(instance, fiber.type, fiber.memoizedProps, rootContainerInstance, hostContext, fiber, shouldWarnIfMisma... | Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding
DOM node. | prepareToHydrateHostInstance | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function prepareToHydrateHostTextInstance(fiber) {
var textInstance = fiber.stateNode;
var textContent = fiber.memoizedProps;
var shouldUpdate = hydrateTextInstance(textInstance, textContent, fiber);
if (shouldUpdate) {
// We assume that prepareToHydrateHostTextInstance is called in a context wh... | Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding
DOM node. | prepareToHydrateHostTextInstance | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function prepareToHydrateHostSuspenseInstance(fiber) {
var suspenseState = fiber.memoizedState;
var suspenseInstance = suspenseState !== null ? suspenseState.dehydrated : null;
if (!suspenseInstance) {
throw new Error('Expected to have a hydrated suspense instance. ' + 'This error is likely caused b... | Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding
DOM node. | prepareToHydrateHostSuspenseInstance | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function skipPastDehydratedSuspenseInstance(fiber) {
var suspenseState = fiber.memoizedState;
var suspenseInstance = suspenseState !== null ? suspenseState.dehydrated : null;
if (!suspenseInstance) {
throw new Error('Expected to have a hydrated suspense instance. ' + 'This error is likely caused by ... | Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding
DOM node. | skipPastDehydratedSuspenseInstance | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function popToNextHostParent(fiber) {
var parent = fiber.return;
while (parent !== null && parent.tag !== HostComponent && parent.tag !== HostRoot && parent.tag !== SuspenseComponent) {
parent = parent.return;
}
hydrationParentFiber = parent;
} | Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding
DOM node. | popToNextHostParent | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function popHydrationState(fiber) {
if (fiber !== hydrationParentFiber) {
// We're deeper than the current hydration context, inside an inserted
// tree.
return false;
}
if (!isHydrating) {
// If we're not currently hydrating but we're in a hydration context, then
// we were ... | Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding
DOM node. | popHydrationState | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function hasUnhydratedTailNodes() {
return isHydrating && nextHydratableInstance !== null;
} | Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding
DOM node. | hasUnhydratedTailNodes | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function warnIfUnhydratedTailNodes(fiber) {
var nextInstance = nextHydratableInstance;
while (nextInstance) {
warnUnhydratedInstance(fiber, nextInstance);
nextInstance = getNextHydratableSibling(nextInstance);
}
} | Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding
DOM node. | warnIfUnhydratedTailNodes | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function resetHydrationState() {
hydrationParentFiber = null;
nextHydratableInstance = null;
isHydrating = false;
didSuspendOrErrorDEV = false;
} | Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding
DOM node. | resetHydrationState | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function upgradeHydrationErrorsToRecoverable() {
if (hydrationErrors !== null) {
// Successfully completed a forced client render. The errors that occurred
// during the hydration attempt are now recovered. We will log them in
// commit phase, once the entire tree has finished.
queueRecovera... | Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding
DOM node. | upgradeHydrationErrorsToRecoverable | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function getIsHydrating() {
return isHydrating;
} | Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding
DOM node. | getIsHydrating | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function queueHydrationError(error) {
if (hydrationErrors === null) {
hydrationErrors = [error];
} else {
hydrationErrors.push(error);
}
} | Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding
DOM node. | queueHydrationError | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function requestCurrentTransition() {
return ReactCurrentBatchConfig$1.transition;
} | Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding
DOM node. | requestCurrentTransition | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
findStrictRoot = function (fiber) {
var maybeStrictRoot = null;
var node = fiber;
while (node !== null) {
if (node.mode & StrictLegacyMode) {
maybeStrictRoot = node;
}
node = node.return;
}
return maybeStrictRoot;
} | Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding
DOM node. | findStrictRoot | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
setToSortedString = function (set) {
var array = [];
set.forEach(function (value) {
array.push(value);
});
return array.sort().join(', ');
} | Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding
DOM node. | setToSortedString | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function isReactClass(type) {
return type.prototype && type.prototype.isReactComponent;
} | Warn if there's no key explicitly set on dynamic arrays of children or
object keys are not valid. This allows us to keep track of children between
updates. | isReactClass | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function coerceRef(returnFiber, current, element) {
var mixedRef = element.ref;
if (mixedRef !== null && typeof mixedRef !== 'function' && typeof mixedRef !== 'object') {
{
// TODO: Clean this up once we turn on the string ref warning for
// everyone, because the strict mode case will no ... | Warn if there's no key explicitly set on dynamic arrays of children or
object keys are not valid. This allows us to keep track of children between
updates. | coerceRef | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
ref = function (value) {
var refs = resolvedInst.refs;
if (value === null) {
delete refs[stringRef];
} else {
refs[stringRef] = value;
}
} | Warn if there's no key explicitly set on dynamic arrays of children or
object keys are not valid. This allows us to keep track of children between
updates. | ref | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function throwOnInvalidObjectType(returnFiber, newChild) {
var childString = Object.prototype.toString.call(newChild);
throw new Error("Objects are not valid as a React child (found: " + (childString === '[object Object]' ? 'object with keys {' + Object.keys(newChild).join(', ') + '}' : childString) + "). " + '... | Warn if there's no key explicitly set on dynamic arrays of children or
object keys are not valid. This allows us to keep track of children between
updates. | throwOnInvalidObjectType | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function warnOnFunctionType(returnFiber) {
{
var componentName = getComponentNameFromFiber(returnFiber) || 'Component';
if (ownerHasFunctionTypeWarning[componentName]) {
return;
}
ownerHasFunctionTypeWarning[componentName] = true;
error('Functions are not valid as a React ch... | Warn if there's no key explicitly set on dynamic arrays of children or
object keys are not valid. This allows us to keep track of children between
updates. | warnOnFunctionType | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function resolveLazy(lazyType) {
var payload = lazyType._payload;
var init = lazyType._init;
return init(payload);
} // This wrapper function exists because I expect to clone the code in each path | Warn if there's no key explicitly set on dynamic arrays of children or
object keys are not valid. This allows us to keep track of children between
updates. | resolveLazy | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function deleteChild(returnFiber, childToDelete) {
if (!shouldTrackSideEffects) {
// Noop.
return;
}
var deletions = returnFiber.deletions;
if (deletions === null) {
returnFiber.deletions = [childToDelete];
returnFiber.flags |= ChildDeletion;
} else {
... | Warn if there's no key explicitly set on dynamic arrays of children or
object keys are not valid. This allows us to keep track of children between
updates. | deleteChild | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function deleteRemainingChildren(returnFiber, currentFirstChild) {
if (!shouldTrackSideEffects) {
// Noop.
return null;
} // TODO: For the shouldClone case, this could be micro-optimized a bit by
// assuming that after the first child we've already added everything.
var childTo... | Warn if there's no key explicitly set on dynamic arrays of children or
object keys are not valid. This allows us to keep track of children between
updates. | deleteRemainingChildren | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function mapRemainingChildren(returnFiber, currentFirstChild) {
// Add the remaining children to a temporary map so that we can find them by
// keys quickly. Implicit (null) keys get added to this set with their index
// instead.
var existingChildren = new Map();
var existingChild = curren... | Warn if there's no key explicitly set on dynamic arrays of children or
object keys are not valid. This allows us to keep track of children between
updates. | mapRemainingChildren | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function useFiber(fiber, pendingProps) {
// We currently set sibling to null and index to 0 here because it is easy
// to forget to do before returning it. E.g. for the single child case.
var clone = createWorkInProgress(fiber, pendingProps);
clone.index = 0;
clone.sibling = null;
re... | Warn if there's no key explicitly set on dynamic arrays of children or
object keys are not valid. This allows us to keep track of children between
updates. | useFiber | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function placeChild(newFiber, lastPlacedIndex, newIndex) {
newFiber.index = newIndex;
if (!shouldTrackSideEffects) {
// During hydration, the useId algorithm needs to know which fibers are
// part of a list of children (arrays, iterators).
newFiber.flags |= Forked;
return la... | Warn if there's no key explicitly set on dynamic arrays of children or
object keys are not valid. This allows us to keep track of children between
updates. | placeChild | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function placeSingleChild(newFiber) {
// This is simpler for the single child case. We only need to do a
// placement for inserting new children.
if (shouldTrackSideEffects && newFiber.alternate === null) {
newFiber.flags |= Placement;
}
return newFiber;
} | Warn if there's no key explicitly set on dynamic arrays of children or
object keys are not valid. This allows us to keep track of children between
updates. | placeSingleChild | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function updateTextNode(returnFiber, current, textContent, lanes) {
if (current === null || current.tag !== HostText) {
// Insert
var created = createFiberFromText(textContent, returnFiber.mode, lanes);
created.return = returnFiber;
return created;
} else {
// Update
... | Warn if there's no key explicitly set on dynamic arrays of children or
object keys are not valid. This allows us to keep track of children between
updates. | updateTextNode | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function updateElement(returnFiber, current, element, lanes) {
var elementType = element.type;
if (elementType === REACT_FRAGMENT_TYPE) {
return updateFragment(returnFiber, current, element.props.children, lanes, element.key);
}
if (current !== null) {
if (current.elementType =... | Warn if there's no key explicitly set on dynamic arrays of children or
object keys are not valid. This allows us to keep track of children between
updates. | updateElement | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function updatePortal(returnFiber, current, portal, lanes) {
if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {
// Insert
var created = createFiberFromPortal(portal, returnF... | Warn if there's no key explicitly set on dynamic arrays of children or
object keys are not valid. This allows us to keep track of children between
updates. | updatePortal | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function updateFragment(returnFiber, current, fragment, lanes, key) {
if (current === null || current.tag !== Fragment) {
// Insert
var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key);
created.return = returnFiber;
return created;
} else {
//... | Warn if there's no key explicitly set on dynamic arrays of children or
object keys are not valid. This allows us to keep track of children between
updates. | updateFragment | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function createChild(returnFiber, newChild, lanes) {
if (typeof newChild === 'string' && newChild !== '' || typeof newChild === 'number') {
// Text nodes don't have keys. If the previous node is implicitly keyed
// we can continue to replace it without aborting even if it is not a text
// ... | Warn if there's no key explicitly set on dynamic arrays of children or
object keys are not valid. This allows us to keep track of children between
updates. | createChild | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function updateSlot(returnFiber, oldFiber, newChild, lanes) {
// Update the fiber if the keys match, otherwise return null.
var key = oldFiber !== null ? oldFiber.key : null;
if (typeof newChild === 'string' && newChild !== '' || typeof newChild === 'number') {
// Text nodes don't have keys. ... | Warn if there's no key explicitly set on dynamic arrays of children or
object keys are not valid. This allows us to keep track of children between
updates. | updateSlot | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes) {
if (typeof newChild === 'string' && newChild !== '' || typeof newChild === 'number') {
// Text nodes don't have keys, so we neither have to check the old nor
// new node for the key. If both are text nodes, they match... | Warn if there's no key explicitly set on dynamic arrays of children or
object keys are not valid. This allows us to keep track of children between
updates. | updateFromMap | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) {
// This algorithm can't optimize by searching from both ends since we
// don't have backpointers on fibers. I'm trying to see how far we can get
// with that model. If it ends up not being worth the tradeoffs, we can... | Warns if there is a duplicate or missing key | reconcileChildrenArray | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, lanes) {
// This is the same implementation as reconcileChildrenArray(),
// but using the iterator instead.
var iteratorFn = getIteratorFn(newChildrenIterable);
if (typeof iteratorFn !== 'function') {
... | Warns if there is a duplicate or missing key | reconcileChildrenIterator | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, lanes) {
// There's no need to check for keys on text nodes since we don't have a
// way to define them.
if (currentFirstChild !== null && currentFirstChild.tag === HostText) {
// We already have an existing node so ... | Warns if there is a duplicate or missing key | reconcileSingleTextNode | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function reconcileSingleElement(returnFiber, currentFirstChild, element, lanes) {
var key = element.key;
var child = currentFirstChild;
while (child !== null) {
// TODO: If key === null and child.key === null, then this only applies to
// the first item in the list.
if (child.... | Warns if there is a duplicate or missing key | reconcileSingleElement | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function reconcileSinglePortal(returnFiber, currentFirstChild, portal, lanes) {
var key = portal.key;
var child = currentFirstChild;
while (child !== null) {
// TODO: If key === null and child.key === null, then this only applies to
// the first item in the list.
if (child.key... | Warns if there is a duplicate or missing key | reconcileSinglePortal | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function reconcileChildFibers(returnFiber, currentFirstChild, newChild, lanes) {
// This function is not recursive.
// If the top level item is an array, we treat it as a set of children,
// not as a fragment. Nested arrays on the other hand will be treated as
// fragment nodes. Recursion happen... | Warns if there is a duplicate or missing key | reconcileChildFibers | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function cloneChildFibers(current, workInProgress) {
if (current !== null && workInProgress.child !== current.child) {
throw new Error('Resuming work not yet implemented.');
}
if (workInProgress.child === null) {
return;
}
var currentChild = workInProgress.child;
var newChild = cre... | Warns if there is a duplicate or missing key | cloneChildFibers | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function resetChildFibers(workInProgress, lanes) {
var child = workInProgress.child;
while (child !== null) {
resetWorkInProgress(child, lanes);
child = child.sibling;
}
} | Warns if there is a duplicate or missing key | resetChildFibers | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function resetContextDependencies() {
// This is called right before React yields execution, to ensure `readContext`
// cannot be called outside the render phase.
currentlyRenderingFiber = null;
lastContextDependency = null;
lastFullyObservedContext = null;
{
isDisallowedContextReadInDEV ... | Warns if there is a duplicate or missing key | resetContextDependencies | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function enterDisallowedContextReadInDEV() {
{
isDisallowedContextReadInDEV = true;
}
} | Warns if there is a duplicate or missing key | enterDisallowedContextReadInDEV | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function exitDisallowedContextReadInDEV() {
{
isDisallowedContextReadInDEV = false;
}
} | Warns if there is a duplicate or missing key | exitDisallowedContextReadInDEV | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function pushProvider(providerFiber, context, nextValue) {
{
push(valueCursor, context._currentValue, providerFiber);
context._currentValue = nextValue;
{
if (context._currentRenderer !== undefined && context._currentRenderer !== null && context._currentRenderer !== rendererSigil) {
... | Warns if there is a duplicate or missing key | pushProvider | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function popProvider(context, providerFiber) {
var currentValue = valueCursor.current;
pop(valueCursor, providerFiber);
{
{
context._currentValue = currentValue;
}
}
} | Warns if there is a duplicate or missing key | popProvider | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function scheduleContextWorkOnParentPath(parent, renderLanes, propagationRoot) {
// Update the child lanes of all the ancestors, including the alternates.
var node = parent;
while (node !== null) {
var alternate = node.alternate;
if (!isSubsetOfLanes(node.childLanes, renderLanes)) {
no... | Warns if there is a duplicate or missing key | scheduleContextWorkOnParentPath | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function propagateContextChange(workInProgress, context, renderLanes) {
{
propagateContextChange_eager(workInProgress, context, renderLanes);
}
} | Warns if there is a duplicate or missing key | propagateContextChange | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function propagateContextChange_eager(workInProgress, context, renderLanes) {
var fiber = workInProgress.child;
if (fiber !== null) {
// Set the return pointer of the child to the work-in-progress fiber.
fiber.return = workInProgress;
}
while (fiber !== null) {
var nextFiber = void ... | Warns if there is a duplicate or missing key | propagateContextChange_eager | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function prepareToReadContext(workInProgress, renderLanes) {
currentlyRenderingFiber = workInProgress;
lastContextDependency = null;
lastFullyObservedContext = null;
var dependencies = workInProgress.dependencies;
if (dependencies !== null) {
{
var firstContext = dependencies.firstCon... | Warns if there is a duplicate or missing key | prepareToReadContext | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function readContext(context) {
{
// This warning would fire if you read context inside a Hook like useMemo.
// Unlike the class check below, it's not enforced in production for perf.
if (isDisallowedContextReadInDEV) {
error('Context can only be read while React is rendering. ' + 'In clas... | Warns if there is a duplicate or missing key | readContext | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function pushConcurrentUpdateQueue(queue) {
if (concurrentQueues === null) {
concurrentQueues = [queue];
} else {
concurrentQueues.push(queue);
}
} | Warns if there is a duplicate or missing key | pushConcurrentUpdateQueue | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function finishQueueingConcurrentUpdates() {
// Transfer the interleaved updates onto the main queue. Each queue has a
// `pending` field and an `interleaved` field. When they are not null, they
// point to the last node in a circular linked list. We need to append the
// interleaved list to the end of ... | Warns if there is a duplicate or missing key | finishQueueingConcurrentUpdates | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function enqueueConcurrentHookUpdate(fiber, queue, update, lane) {
var interleaved = queue.interleaved;
if (interleaved === null) {
// This is the first update. Create a circular list.
update.next = update; // At the end of the current render, this queue's interleaved updates will
// be trans... | Warns if there is a duplicate or missing key | enqueueConcurrentHookUpdate | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function enqueueConcurrentHookUpdateAndEagerlyBailout(fiber, queue, update, lane) {
var interleaved = queue.interleaved;
if (interleaved === null) {
// This is the first update. Create a circular list.
update.next = update; // At the end of the current render, this queue's interleaved updates will
... | Warns if there is a duplicate or missing key | enqueueConcurrentHookUpdateAndEagerlyBailout | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function enqueueConcurrentClassUpdate(fiber, queue, update, lane) {
var interleaved = queue.interleaved;
if (interleaved === null) {
// This is the first update. Create a circular list.
update.next = update; // At the end of the current render, this queue's interleaved updates will
// be tran... | Warns if there is a duplicate or missing key | enqueueConcurrentClassUpdate | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function enqueueConcurrentRenderForLane(fiber, lane) {
return markUpdateLaneFromFiberToRoot(fiber, lane);
} // Calling this function outside this module should only be done for backwards | Warns if there is a duplicate or missing key | enqueueConcurrentRenderForLane | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function markUpdateLaneFromFiberToRoot(sourceFiber, lane) {
// Update the source fiber's lanes
sourceFiber.lanes = mergeLanes(sourceFiber.lanes, lane);
var alternate = sourceFiber.alternate;
if (alternate !== null) {
alternate.lanes = mergeLanes(alternate.lanes, lane);
}
{
if (alte... | Warns if there is a duplicate or missing key | markUpdateLaneFromFiberToRoot | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function initializeUpdateQueue(fiber) {
var queue = {
baseState: fiber.memoizedState,
firstBaseUpdate: null,
lastBaseUpdate: null,
shared: {
pending: null,
interleaved: null,
lanes: NoLanes
},
effects: null
};
fiber.updateQueue = queue;
} | Warns if there is a duplicate or missing key | initializeUpdateQueue | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function cloneUpdateQueue(current, workInProgress) {
// Clone the update queue from current. Unless it's already a clone.
var queue = workInProgress.updateQueue;
var currentQueue = current.updateQueue;
if (queue === currentQueue) {
var clone = {
baseState: currentQueue.baseState,
... | Warns if there is a duplicate or missing key | cloneUpdateQueue | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function createUpdate(eventTime, lane) {
var update = {
eventTime: eventTime,
lane: lane,
tag: UpdateState,
payload: null,
callback: null,
next: null
};
return update;
} | Warns if there is a duplicate or missing key | createUpdate | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function enqueueUpdate(fiber, update, lane) {
var updateQueue = fiber.updateQueue;
if (updateQueue === null) {
// Only occurs if the fiber has been unmounted.
return null;
}
var sharedQueue = updateQueue.shared;
{
if (currentlyProcessingQueue === sharedQueue && !didWarnUpdateIns... | Warns if there is a duplicate or missing key | enqueueUpdate | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function entangleTransitions(root, fiber, lane) {
var updateQueue = fiber.updateQueue;
if (updateQueue === null) {
// Only occurs if the fiber has been unmounted.
return;
}
var sharedQueue = updateQueue.shared;
if (isTransitionLane(lane)) {
var queueLanes = sharedQueue.lanes; //... | Warns if there is a duplicate or missing key | entangleTransitions | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function enqueueCapturedUpdate(workInProgress, capturedUpdate) {
// Captured updates are updates that are thrown by a child during the render
// phase. They should be discarded if the render is aborted. Therefore,
// we should only put them on the work-in-progress queue, not the current one.
var queue =... | Warns if there is a duplicate or missing key | enqueueCapturedUpdate | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function getStateFromUpdate(workInProgress, queue, update, prevState, nextProps, instance) {
switch (update.tag) {
case ReplaceState:
{
var payload = update.payload;
if (typeof payload === 'function') {
// Updater function
{
enterDisallowedCon... | Warns if there is a duplicate or missing key | getStateFromUpdate | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function processUpdateQueue(workInProgress, props, instance, renderLanes) {
// This is always non-null on a ClassComponent or HostRoot
var queue = workInProgress.updateQueue;
hasForceUpdate = false;
{
currentlyProcessingQueue = queue.shared;
}
var firstBaseUpdate = queue.firstBaseUpdate;... | Warns if there is a duplicate or missing key | processUpdateQueue | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function callCallback(callback, context) {
if (typeof callback !== 'function') {
throw new Error('Invalid argument passed as callback. Expected a function. Instead ' + ("received: " + callback));
}
callback.call(context);
} | Warns if there is a duplicate or missing key | callCallback | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function resetHasForceUpdateBeforeProcessing() {
hasForceUpdate = false;
} | Warns if there is a duplicate or missing key | resetHasForceUpdateBeforeProcessing | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function checkHasForceUpdateAfterProcessing() {
return hasForceUpdate;
} | Warns if there is a duplicate or missing key | checkHasForceUpdateAfterProcessing | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function commitUpdateQueue(finishedWork, finishedQueue, instance) {
// Commit the effects
var effects = finishedQueue.effects;
finishedQueue.effects = null;
if (effects !== null) {
for (var i = 0; i < effects.length; i++) {
var effect = effects[i];
var callback = effect.callback;
... | Warns if there is a duplicate or missing key | commitUpdateQueue | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function requiredContext(c) {
if (c === NO_CONTEXT) {
throw new Error('Expected host context to exist. This error is likely caused by a bug ' + 'in React. Please file an issue.');
}
return c;
} | Warns if there is a duplicate or missing key | requiredContext | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function getRootHostContainer() {
var rootInstance = requiredContext(rootInstanceStackCursor.current);
return rootInstance;
} | Warns if there is a duplicate or missing key | getRootHostContainer | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function pushHostContainer(fiber, nextRootInstance) {
// Push current root instance onto the stack;
// This allows us to reset root when portals are popped.
push(rootInstanceStackCursor, nextRootInstance, fiber); // Track the context and the Fiber that provided it.
// This enables us to pop only Fibers ... | Warns if there is a duplicate or missing key | pushHostContainer | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function popHostContainer(fiber) {
pop(contextStackCursor$1, fiber);
pop(contextFiberStackCursor, fiber);
pop(rootInstanceStackCursor, fiber);
} | Warns if there is a duplicate or missing key | popHostContainer | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function getHostContext() {
var context = requiredContext(contextStackCursor$1.current);
return context;
} | Warns if there is a duplicate or missing key | getHostContext | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function pushHostContext(fiber) {
var rootInstance = requiredContext(rootInstanceStackCursor.current);
var context = requiredContext(contextStackCursor$1.current);
var nextContext = getChildHostContext(context, fiber.type); // Don't push this Fiber's context unless it's unique.
if (context === nextCont... | Warns if there is a duplicate or missing key | pushHostContext | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function popHostContext(fiber) {
// Do not pop unless this Fiber provided the current context.
// pushHostContext() only pushes Fibers that provide unique contexts.
if (contextFiberStackCursor.current !== fiber) {
return;
}
pop(contextStackCursor$1, fiber);
pop(contextFiberStackCursor, fi... | Warns if there is a duplicate or missing key | popHostContext | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function hasSuspenseContext(parentContext, flag) {
return (parentContext & flag) !== 0;
} | Warns if there is a duplicate or missing key | hasSuspenseContext | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function setDefaultShallowSuspenseContext(parentContext) {
return parentContext & SubtreeSuspenseContextMask;
} | Warns if there is a duplicate or missing key | setDefaultShallowSuspenseContext | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function setShallowSuspenseContext(parentContext, shallowContext) {
return parentContext & SubtreeSuspenseContextMask | shallowContext;
} | Warns if there is a duplicate or missing key | setShallowSuspenseContext | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function addSubtreeSuspenseContext(parentContext, subtreeContext) {
return parentContext | subtreeContext;
} | Warns if there is a duplicate or missing key | addSubtreeSuspenseContext | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function pushSuspenseContext(fiber, newContext) {
push(suspenseStackCursor, newContext, fiber);
} | Warns if there is a duplicate or missing key | pushSuspenseContext | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function popSuspenseContext(fiber) {
pop(suspenseStackCursor, fiber);
} | Warns if there is a duplicate or missing key | popSuspenseContext | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function shouldCaptureSuspense(workInProgress, hasInvisibleParent) {
// If it was the primary children that just suspended, capture and render the
// fallback. Otherwise, don't capture and bubble to the next boundary.
var nextState = workInProgress.memoizedState;
if (nextState !== null) {
if (nex... | Warns if there is a duplicate or missing key | shouldCaptureSuspense | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function findFirstSuspended(row) {
var node = row;
while (node !== null) {
if (node.tag === SuspenseComponent) {
var state = node.memoizedState;
if (state !== null) {
var dehydrated = state.dehydrated;
if (dehydrated === null || isSuspenseInstancePending(dehydrated) ... | Warns if there is a duplicate or missing key | findFirstSuspended | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function resetWorkInProgressVersions() {
for (var i = 0; i < workInProgressSources.length; i++) {
var mutableSource = workInProgressSources[i];
{
mutableSource._workInProgressVersionPrimary = null;
}
}
workInProgressSources.length = 0;
} | Warns if there is a duplicate or missing key | resetWorkInProgressVersions | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function registerMutableSourceForHydration(root, mutableSource) {
var getVersion = mutableSource._getVersion;
var version = getVersion(mutableSource._source); // TODO Clear this data once all pending hydration work is finished.
// Retaining it forever may interfere with GC.
if (root.mutableSourceEagerH... | Warns if there is a duplicate or missing key | registerMutableSourceForHydration | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function mountHookTypesDev() {
{
var hookName = currentHookNameInDev;
if (hookTypesDev === null) {
hookTypesDev = [hookName];
} else {
hookTypesDev.push(hookName);
}
}
} | Warns if there is a duplicate or missing key | mountHookTypesDev | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function updateHookTypesDev() {
{
var hookName = currentHookNameInDev;
if (hookTypesDev !== null) {
hookTypesUpdateIndexDev++;
if (hookTypesDev[hookTypesUpdateIndexDev] !== hookName) {
warnOnHookMismatchInDev(hookName);
}
}
}
} | Warns if there is a duplicate or missing key | updateHookTypesDev | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function checkDepsAreArrayDev(deps) {
{
if (deps !== undefined && deps !== null && !isArray(deps)) {
// Verify deps, but only on mount to avoid extra checks.
// It's unlikely their type would change as usually you define them inline.
error('%s received a final argument that is not an a... | Warns if there is a duplicate or missing key | checkDepsAreArrayDev | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function warnOnHookMismatchInDev(currentHookName) {
{
var componentName = getComponentNameFromFiber(currentlyRenderingFiber$1);
if (!didWarnAboutMismatchedHooksForComponent.has(componentName)) {
didWarnAboutMismatchedHooksForComponent.add(componentName);
if (hookTypesDev !== null) {
... | Warns if there is a duplicate or missing key | warnOnHookMismatchInDev | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function throwInvalidHookError() {
throw new Error('Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for' + ' one of the following reasons:\n' + '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' + '2. You might be breaki... | Warns if there is a duplicate or missing key | throwInvalidHookError | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function areHookInputsEqual(nextDeps, prevDeps) {
{
if (ignorePreviousDependencies) {
// Only true when this component is being hot reloaded.
return false;
}
}
if (prevDeps === null) {
{
error('%s received a final argument during this render, but not during ' + 'th... | Warns if there is a duplicate or missing key | areHookInputsEqual | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function renderWithHooks(current, workInProgress, Component, props, secondArg, nextRenderLanes) {
renderLanes = nextRenderLanes;
currentlyRenderingFiber$1 = workInProgress;
{
hookTypesDev = current !== null ? current._debugHookTypes : null;
hookTypesUpdateIndexDev = -1; // Used for hot reloadin... | Warns if there is a duplicate or missing key | renderWithHooks | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function checkDidRenderIdHook() {
// This should be called immediately after every renderWithHooks call.
// Conceptually, it's part of the return value of renderWithHooks; it's only a
// separate function to avoid using an array tuple.
var didRenderIdHook = localIdCounter !== 0;
localIdCounter = 0;
... | Warns if there is a duplicate or missing key | checkDidRenderIdHook | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function bailoutHooks(current, workInProgress, lanes) {
workInProgress.updateQueue = current.updateQueue; // TODO: Don't need to reset the flags here, because they're reset in the
// complete phase (bubbleProperties).
if ( (workInProgress.mode & StrictEffectsMode) !== NoMode) {
workInProgress.flags &... | Warns if there is a duplicate or missing key | bailoutHooks | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function resetHooksAfterThrow() {
// We can assume the previous dispatcher is always this one, since we set it
// at the beginning of the render phase and there's no re-entrance.
ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;
if (didScheduleRenderPhaseUpdate) {
// There were render pha... | Warns if there is a duplicate or missing key | resetHooksAfterThrow | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
function mountWorkInProgressHook() {
var hook = {
memoizedState: null,
baseState: null,
baseQueue: null,
queue: null,
next: null
};
if (workInProgressHook === null) {
// This is the first hook in the list
currentlyRenderingFiber$1.memoizedState = workInProgressHook... | Warns if there is a duplicate or missing key | mountWorkInProgressHook | javascript | facebook/memlab | packages/lens/src/tests/lib/react-dom-v18.dev.js | https://github.com/facebook/memlab/blob/master/packages/lens/src/tests/lib/react-dom-v18.dev.js | MIT |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.