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 validateProperty(tagName, name) {
{
if (hasOwnProperty.call(warnedProperties, name) && warnedProperties[name]) {
return true;
}
if (rARIACamel.test(name)) {
var ariaName = 'aria-' + name.slice(4).toLowerCase();
var correctName = ariaProperties.hasOwnProperty(ariaN... | When mixing shorthand and longhand property names, we warn during updates if
we expect an incorrect result to occur. In particular, we warn for:
Updating a shorthand property (longhand gets overwritten):
{font: 'foo', fontVariant: 'bar'} -> {font: 'baz', fontVariant: 'bar'}
becomes .style.font = 'baz'
Removing a s... | validateProperty | 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 warnInvalidARIAProps(type, props) {
{
var invalidProps = [];
for (var key in props) {
var isValid = validateProperty(type, key);
if (!isValid) {
invalidProps.push(key);
}
}
var unknownPropString = invalidProps.map(function (prop) {
return... | When mixing shorthand and longhand property names, we warn during updates if
we expect an incorrect result to occur. In particular, we warn for:
Updating a shorthand property (longhand gets overwritten):
{font: 'foo', fontVariant: 'bar'} -> {font: 'baz', fontVariant: 'bar'}
becomes .style.font = 'baz'
Removing a s... | warnInvalidARIAProps | 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 validateProperties(type, props) {
if (isCustomComponent(type, props)) {
return;
}
warnInvalidARIAProps(type, props);
} | When mixing shorthand and longhand property names, we warn during updates if
we expect an incorrect result to occur. In particular, we warn for:
Updating a shorthand property (longhand gets overwritten):
{font: 'foo', fontVariant: 'bar'} -> {font: 'baz', fontVariant: 'bar'}
becomes .style.font = 'baz'
Removing a s... | validateProperties | 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 validateProperties$1(type, props) {
{
if (type !== 'input' && type !== 'textarea' && type !== 'select') {
return;
}
if (props != null && props.value === null && !didWarnValueNull) {
didWarnValueNull = true;
if (type === 'select' && props.multiple) {
err... | When mixing shorthand and longhand property names, we warn during updates if
we expect an incorrect result to occur. In particular, we warn for:
Updating a shorthand property (longhand gets overwritten):
{font: 'foo', fontVariant: 'bar'} -> {font: 'baz', fontVariant: 'bar'}
becomes .style.font = 'baz'
Removing a s... | validateProperties$1 | 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 |
warnUnknownProperties = function (type, props, eventRegistry) {
{
var unknownProps = [];
for (var key in props) {
var isValid = validateProperty$1(type, key, props[key], eventRegistry);
if (!isValid) {
unknownProps.push(key);
}
}
var unknownPropString = u... | When mixing shorthand and longhand property names, we warn during updates if
we expect an incorrect result to occur. In particular, we warn for:
Updating a shorthand property (longhand gets overwritten):
{font: 'foo', fontVariant: 'bar'} -> {font: 'baz', fontVariant: 'bar'}
becomes .style.font = 'baz'
Removing a s... | warnUnknownProperties | 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 validateProperties$2(type, props, eventRegistry) {
if (isCustomComponent(type, props)) {
return;
}
warnUnknownProperties(type, props, eventRegistry);
} | When mixing shorthand and longhand property names, we warn during updates if
we expect an incorrect result to occur. In particular, we warn for:
Updating a shorthand property (longhand gets overwritten):
{font: 'foo', fontVariant: 'bar'} -> {font: 'baz', fontVariant: 'bar'}
becomes .style.font = 'baz'
Removing a s... | validateProperties$2 | 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 setReplayingEvent(event) {
{
if (currentReplayingEvent !== null) {
error('Expected currently replaying event to be null. This error ' + 'is likely caused by a bug in React. Please file an issue.');
}
}
currentReplayingEvent = event;
} | When mixing shorthand and longhand property names, we warn during updates if
we expect an incorrect result to occur. In particular, we warn for:
Updating a shorthand property (longhand gets overwritten):
{font: 'foo', fontVariant: 'bar'} -> {font: 'baz', fontVariant: 'bar'}
becomes .style.font = 'baz'
Removing a s... | setReplayingEvent | 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 resetReplayingEvent() {
{
if (currentReplayingEvent === null) {
error('Expected currently replaying event to not be null. This error ' + 'is likely caused by a bug in React. Please file an issue.');
}
}
currentReplayingEvent = null;
} | When mixing shorthand and longhand property names, we warn during updates if
we expect an incorrect result to occur. In particular, we warn for:
Updating a shorthand property (longhand gets overwritten):
{font: 'foo', fontVariant: 'bar'} -> {font: 'baz', fontVariant: 'bar'}
becomes .style.font = 'baz'
Removing a s... | resetReplayingEvent | 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 isReplayingEvent(event) {
return event === currentReplayingEvent;
} | When mixing shorthand and longhand property names, we warn during updates if
we expect an incorrect result to occur. In particular, we warn for:
Updating a shorthand property (longhand gets overwritten):
{font: 'foo', fontVariant: 'bar'} -> {font: 'baz', fontVariant: 'bar'}
becomes .style.font = 'baz'
Removing a s... | isReplayingEvent | 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 getEventTarget(nativeEvent) {
// Fallback to nativeEvent.srcElement for IE9
// https://github.com/facebook/react/issues/12506
var target = nativeEvent.target || nativeEvent.srcElement || window; // Normalize SVG <use> element events #4963
if (target.correspondingUseElement) {
target = ta... | Gets the target node from a native browser event by accounting for
inconsistencies in browser DOM APIs.
@param {object} nativeEvent Native browser event.
@return {DOMEventTarget} Target node. | getEventTarget | 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 restoreStateOfTarget(target) {
// We perform this translation at the end of the event loop so that we
// always receive the correct fiber here
var internalInstance = getInstanceFromNode(target);
if (!internalInstance) {
// Unmounted
return;
}
if (typeof restoreImpl !== 'fu... | Gets the target node from a native browser event by accounting for
inconsistencies in browser DOM APIs.
@param {object} nativeEvent Native browser event.
@return {DOMEventTarget} Target node. | restoreStateOfTarget | 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 setRestoreImplementation(impl) {
restoreImpl = impl;
} | Gets the target node from a native browser event by accounting for
inconsistencies in browser DOM APIs.
@param {object} nativeEvent Native browser event.
@return {DOMEventTarget} Target node. | setRestoreImplementation | 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 enqueueStateRestore(target) {
if (restoreTarget) {
if (restoreQueue) {
restoreQueue.push(target);
} else {
restoreQueue = [target];
}
} else {
restoreTarget = target;
}
} | Gets the target node from a native browser event by accounting for
inconsistencies in browser DOM APIs.
@param {object} nativeEvent Native browser event.
@return {DOMEventTarget} Target node. | enqueueStateRestore | 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 needsStateRestore() {
return restoreTarget !== null || restoreQueue !== null;
} | Gets the target node from a native browser event by accounting for
inconsistencies in browser DOM APIs.
@param {object} nativeEvent Native browser event.
@return {DOMEventTarget} Target node. | needsStateRestore | 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 restoreStateIfNeeded() {
if (!restoreTarget) {
return;
}
var target = restoreTarget;
var queuedTargets = restoreQueue;
restoreTarget = null;
restoreQueue = null;
restoreStateOfTarget(target);
if (queuedTargets) {
for (var i = 0; i < queuedTargets.length; i++) {
... | Gets the target node from a native browser event by accounting for
inconsistencies in browser DOM APIs.
@param {object} nativeEvent Native browser event.
@return {DOMEventTarget} Target node. | restoreStateIfNeeded | 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 |
batchedUpdatesImpl = function (fn, bookkeeping) {
return fn(bookkeeping);
} | Gets the target node from a native browser event by accounting for
inconsistencies in browser DOM APIs.
@param {object} nativeEvent Native browser event.
@return {DOMEventTarget} Target node. | batchedUpdatesImpl | 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 finishEventHandler() {
// Here we wait until all updates have propagated, which is important
// when using controlled components within layers:
// https://github.com/facebook/react/issues/1698
// Then we restore state of any controlled component.
var controlledComponentsHavePendingUpdates =... | Gets the target node from a native browser event by accounting for
inconsistencies in browser DOM APIs.
@param {object} nativeEvent Native browser event.
@return {DOMEventTarget} Target node. | finishEventHandler | 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 batchedUpdates(fn, a, b) {
if (isInsideEventHandler) {
// If we are currently inside another batch, we need to wait until it
// fully completes before restoring state.
return fn(a, b);
}
isInsideEventHandler = true;
try {
return batchedUpdatesImpl(fn, a, b);
} fina... | Gets the target node from a native browser event by accounting for
inconsistencies in browser DOM APIs.
@param {object} nativeEvent Native browser event.
@return {DOMEventTarget} Target node. | batchedUpdates | 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 setBatchingImplementation(_batchedUpdatesImpl, _discreteUpdatesImpl, _flushSyncImpl) {
batchedUpdatesImpl = _batchedUpdatesImpl;
flushSyncImpl = _flushSyncImpl;
} | Gets the target node from a native browser event by accounting for
inconsistencies in browser DOM APIs.
@param {object} nativeEvent Native browser event.
@return {DOMEventTarget} Target node. | setBatchingImplementation | 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 isInteractive(tag) {
return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea';
} | Gets the target node from a native browser event by accounting for
inconsistencies in browser DOM APIs.
@param {object} nativeEvent Native browser event.
@return {DOMEventTarget} Target node. | isInteractive | 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 shouldPreventMouseEvent(name, type, props) {
switch (name) {
case 'onClick':
case 'onClickCapture':
case 'onDoubleClick':
case 'onDoubleClickCapture':
case 'onMouseDown':
case 'onMouseDownCapture':
case 'onMouseMove':
case 'onMouseMoveCapture':
case 'on... | Gets the target node from a native browser event by accounting for
inconsistencies in browser DOM APIs.
@param {object} nativeEvent Native browser event.
@return {DOMEventTarget} Target node. | shouldPreventMouseEvent | 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 getListener(inst, registrationName) {
var stateNode = inst.stateNode;
if (stateNode === null) {
// Work in progress (ex: onload events in incremental mode).
return null;
}
var props = getFiberCurrentPropsFromNode(stateNode);
if (props === null) {
// Work in progress.
... | @param {object} inst The instance, which is the source of events.
@param {string} registrationName Name of listener (e.g. `onClick`).
@return {?function} The stored callback. | getListener | 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 invokeGuardedCallbackProd(name, func, context, a, b, c, d, e, f) {
var funcArgs = Array.prototype.slice.call(arguments, 3);
try {
func.apply(context, funcArgs);
} catch (error) {
this.onError(error);
}
} | @param {object} inst The instance, which is the source of events.
@param {string} registrationName Name of listener (e.g. `onClick`).
@return {?function} The stored callback. | invokeGuardedCallbackProd | 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 restoreAfterDispatch() {
// We immediately remove the callback from event listeners so that
// nested `invokeGuardedCallback` calls do not clash. Otherwise, a
// nested call would trigger the fake event handlers of any call higher
// in the stack.
fakeNode.remo... | @param {object} inst The instance, which is the source of events.
@param {string} registrationName Name of listener (e.g. `onClick`).
@return {?function} The stored callback. | restoreAfterDispatch | 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() {
didCall = true;
restoreAfterDispatch();
func.apply(context, funcArgs);
didError = false;
} // Create a global error event handler. We use this to capture the value | @param {object} inst The instance, which is the source of events.
@param {string} registrationName Name of listener (e.g. `onClick`).
@return {?function} The stored callback. | 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 handleWindowError(event) {
error = event.error;
didSetError = true;
if (error === null && event.colno === 0 && event.lineno === 0) {
isCrossOriginError = true;
}
if (event.defaultPrevented) {
// Some other error handler has prevented d... | @param {object} inst The instance, which is the source of events.
@param {string} registrationName Name of listener (e.g. `onClick`).
@return {?function} The stored callback. | handleWindowError | 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 invokeGuardedCallback(name, func, context, a, b, c, d, e, f) {
hasError = false;
caughtError = null;
invokeGuardedCallbackImpl$1.apply(reporter, arguments);
} | Call a function while guarding against errors that happens within it.
Returns an error if it throws, otherwise null.
In production, this is implemented using a try-catch. The reason we don't
use a try-catch directly is so that we can swap out a different
implementation in DEV mode.
@param {String} name of the guard t... | invokeGuardedCallback | 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 invokeGuardedCallbackAndCatchFirstError(name, func, context, a, b, c, d, e, f) {
invokeGuardedCallback.apply(this, arguments);
if (hasError) {
var error = clearCaughtError();
if (!hasRethrowError) {
hasRethrowError = true;
rethrowError = error;
}
}
} | Same as invokeGuardedCallback, but instead of returning an error, it stores
it in a global so it can be rethrown by `rethrowCaughtError` later.
TODO: See if caughtError and rethrowError can be unified.
@param {String} name of the guard to use for logging or debugging
@param {Function} func The function to invoke
@para... | invokeGuardedCallbackAndCatchFirstError | 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 rethrowCaughtError() {
if (hasRethrowError) {
var error = rethrowError;
hasRethrowError = false;
rethrowError = null;
throw error;
}
} | During execution of guarded functions we will capture the first error which
we will rethrow to be handled by the top level error handler. | rethrowCaughtError | 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 hasCaughtError() {
return hasError;
} | During execution of guarded functions we will capture the first error which
we will rethrow to be handled by the top level error handler. | hasCaughtError | 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 clearCaughtError() {
if (hasError) {
var error = caughtError;
hasError = false;
caughtError = null;
return error;
} else {
throw new Error('clearCaughtError was called but no error was captured. This error ' + 'is likely caused by a bug in React. Please file an issue.');
... | During execution of guarded functions we will capture the first error which
we will rethrow to be handled by the top level error handler. | clearCaughtError | 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 get(key) {
return key._reactInternals;
} | `ReactInstanceMap` maintains a mapping from a public facing stateful
instance (key) and the internal representation (value). This allows public
methods to accept the user facing instance as an argument and map them back
to internal methods.
Note that this module is currently shared and assumed to be stateless.
If this... | get | 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 has(key) {
return key._reactInternals !== undefined;
} | `ReactInstanceMap` maintains a mapping from a public facing stateful
instance (key) and the internal representation (value). This allows public
methods to accept the user facing instance as an argument and map them back
to internal methods.
Note that this module is currently shared and assumed to be stateless.
If this... | has | 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 set(key, value) {
key._reactInternals = value;
} | `ReactInstanceMap` maintains a mapping from a public facing stateful
instance (key) and the internal representation (value). This allows public
methods to accept the user facing instance as an argument and map them back
to internal methods.
Note that this module is currently shared and assumed to be stateless.
If this... | set | 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 getNearestMountedFiber(fiber) {
var node = fiber;
var nearestMounted = fiber;
if (!fiber.alternate) {
// If there is no alternate, this might be a new tree that isn't inserted
// yet. If it is, then it will have a pending insertion effect on it.
var nextNode = node;
do {
... | `ReactInstanceMap` maintains a mapping from a public facing stateful
instance (key) and the internal representation (value). This allows public
methods to accept the user facing instance as an argument and map them back
to internal methods.
Note that this module is currently shared and assumed to be stateless.
If this... | getNearestMountedFiber | 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 getSuspenseInstanceFromFiber(fiber) {
if (fiber.tag === SuspenseComponent) {
var suspenseState = fiber.memoizedState;
if (suspenseState === null) {
var current = fiber.alternate;
if (current !== null) {
suspenseState = current.memoizedState;
}
}
... | `ReactInstanceMap` maintains a mapping from a public facing stateful
instance (key) and the internal representation (value). This allows public
methods to accept the user facing instance as an argument and map them back
to internal methods.
Note that this module is currently shared and assumed to be stateless.
If this... | getSuspenseInstanceFromFiber | 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 getContainerFromFiber(fiber) {
return fiber.tag === HostRoot ? fiber.stateNode.containerInfo : null;
} | `ReactInstanceMap` maintains a mapping from a public facing stateful
instance (key) and the internal representation (value). This allows public
methods to accept the user facing instance as an argument and map them back
to internal methods.
Note that this module is currently shared and assumed to be stateless.
If this... | getContainerFromFiber | 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 isFiberMounted(fiber) {
return getNearestMountedFiber(fiber) === fiber;
} | `ReactInstanceMap` maintains a mapping from a public facing stateful
instance (key) and the internal representation (value). This allows public
methods to accept the user facing instance as an argument and map them back
to internal methods.
Note that this module is currently shared and assumed to be stateless.
If this... | isFiberMounted | 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 isMounted(component) {
{
var owner = ReactCurrentOwner.current;
if (owner !== null && owner.tag === ClassComponent) {
var ownerFiber = owner;
var instance = ownerFiber.stateNode;
if (!instance._warnedAboutRefsInRender) {
error('%s is accessing isMounted insid... | `ReactInstanceMap` maintains a mapping from a public facing stateful
instance (key) and the internal representation (value). This allows public
methods to accept the user facing instance as an argument and map them back
to internal methods.
Note that this module is currently shared and assumed to be stateless.
If this... | isMounted | 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 assertIsMounted(fiber) {
if (getNearestMountedFiber(fiber) !== fiber) {
throw new Error('Unable to find node on an unmounted component.');
}
} | `ReactInstanceMap` maintains a mapping from a public facing stateful
instance (key) and the internal representation (value). This allows public
methods to accept the user facing instance as an argument and map them back
to internal methods.
Note that this module is currently shared and assumed to be stateless.
If this... | assertIsMounted | 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 findCurrentFiberUsingSlowPath(fiber) {
var alternate = fiber.alternate;
if (!alternate) {
// If there is no alternate, then we only need to check if it is mounted.
var nearestMounted = getNearestMountedFiber(fiber);
if (nearestMounted === null) {
throw new Error('Unable to f... | `ReactInstanceMap` maintains a mapping from a public facing stateful
instance (key) and the internal representation (value). This allows public
methods to accept the user facing instance as an argument and map them back
to internal methods.
Note that this module is currently shared and assumed to be stateless.
If this... | findCurrentFiberUsingSlowPath | 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 findCurrentHostFiber(parent) {
var currentParent = findCurrentFiberUsingSlowPath(parent);
return currentParent !== null ? findCurrentHostFiberImpl(currentParent) : null;
} | `ReactInstanceMap` maintains a mapping from a public facing stateful
instance (key) and the internal representation (value). This allows public
methods to accept the user facing instance as an argument and map them back
to internal methods.
Note that this module is currently shared and assumed to be stateless.
If this... | findCurrentHostFiber | 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 findCurrentHostFiberImpl(node) {
// Next we'll drill down this component to find the first HostComponent/Text.
if (node.tag === HostComponent || node.tag === HostText) {
return node;
}
var child = node.child;
while (child !== null) {
var match = findCurrentHostFiberImpl(child)... | `ReactInstanceMap` maintains a mapping from a public facing stateful
instance (key) and the internal representation (value). This allows public
methods to accept the user facing instance as an argument and map them back
to internal methods.
Note that this module is currently shared and assumed to be stateless.
If this... | findCurrentHostFiberImpl | 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 findCurrentHostFiberWithNoPortals(parent) {
var currentParent = findCurrentFiberUsingSlowPath(parent);
return currentParent !== null ? findCurrentHostFiberWithNoPortalsImpl(currentParent) : null;
} | `ReactInstanceMap` maintains a mapping from a public facing stateful
instance (key) and the internal representation (value). This allows public
methods to accept the user facing instance as an argument and map them back
to internal methods.
Note that this module is currently shared and assumed to be stateless.
If this... | findCurrentHostFiberWithNoPortals | 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 findCurrentHostFiberWithNoPortalsImpl(node) {
// Next we'll drill down this component to find the first HostComponent/Text.
if (node.tag === HostComponent || node.tag === HostText) {
return node;
}
var child = node.child;
while (child !== null) {
if (child.tag !== HostPortal) ... | `ReactInstanceMap` maintains a mapping from a public facing stateful
instance (key) and the internal representation (value). This allows public
methods to accept the user facing instance as an argument and map them back
to internal methods.
Note that this module is currently shared and assumed to be stateless.
If this... | findCurrentHostFiberWithNoPortalsImpl | 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 injectInternals(internals) {
if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') {
// No DevTools
return false;
}
var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__;
if (hook.isDisabled) {
// This isn't a real property on the hook, but it can be set to opt out
// of DevT... | `ReactInstanceMap` maintains a mapping from a public facing stateful
instance (key) and the internal representation (value). This allows public
methods to accept the user facing instance as an argument and map them back
to internal methods.
Note that this module is currently shared and assumed to be stateless.
If this... | injectInternals | 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 onScheduleRoot(root, children) {
{
if (injectedHook && typeof injectedHook.onScheduleFiberRoot === 'function') {
try {
injectedHook.onScheduleFiberRoot(rendererID, root, children);
} catch (err) {
if ( !hasLoggedError) {
hasLoggedError = true;
... | `ReactInstanceMap` maintains a mapping from a public facing stateful
instance (key) and the internal representation (value). This allows public
methods to accept the user facing instance as an argument and map them back
to internal methods.
Note that this module is currently shared and assumed to be stateless.
If this... | onScheduleRoot | 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 onCommitRoot(root, eventPriority) {
if (injectedHook && typeof injectedHook.onCommitFiberRoot === 'function') {
try {
var didError = (root.current.flags & DidCapture) === DidCapture;
if (enableProfilerTimer) {
var schedulerPriority;
switch (eventPriority) {
... | `ReactInstanceMap` maintains a mapping from a public facing stateful
instance (key) and the internal representation (value). This allows public
methods to accept the user facing instance as an argument and map them back
to internal methods.
Note that this module is currently shared and assumed to be stateless.
If this... | onCommitRoot | 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 onPostCommitRoot(root) {
if (injectedHook && typeof injectedHook.onPostCommitFiberRoot === 'function') {
try {
injectedHook.onPostCommitFiberRoot(rendererID, root);
} catch (err) {
{
if (!hasLoggedError) {
hasLoggedError = true;
error('React in... | `ReactInstanceMap` maintains a mapping from a public facing stateful
instance (key) and the internal representation (value). This allows public
methods to accept the user facing instance as an argument and map them back
to internal methods.
Note that this module is currently shared and assumed to be stateless.
If this... | onPostCommitRoot | 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 onCommitUnmount(fiber) {
if (injectedHook && typeof injectedHook.onCommitFiberUnmount === 'function') {
try {
injectedHook.onCommitFiberUnmount(rendererID, fiber);
} catch (err) {
{
if (!hasLoggedError) {
hasLoggedError = true;
error('React ins... | `ReactInstanceMap` maintains a mapping from a public facing stateful
instance (key) and the internal representation (value). This allows public
methods to accept the user facing instance as an argument and map them back
to internal methods.
Note that this module is currently shared and assumed to be stateless.
If this... | onCommitUnmount | 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 setIsStrictModeForDevtools(newIsStrictMode) {
{
if (typeof unstable_yieldValue$1 === 'function') {
// We're in a test because Scheduler.unstable_yieldValue only exists
// in SchedulerMock. To reduce the noise in strict mode tests,
// suppress warnings and disable scheduler yie... | `ReactInstanceMap` maintains a mapping from a public facing stateful
instance (key) and the internal representation (value). This allows public
methods to accept the user facing instance as an argument and map them back
to internal methods.
Note that this module is currently shared and assumed to be stateless.
If this... | setIsStrictModeForDevtools | 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 injectProfilingHooks(profilingHooks) {
injectedProfilingHooks = profilingHooks;
} | `ReactInstanceMap` maintains a mapping from a public facing stateful
instance (key) and the internal representation (value). This allows public
methods to accept the user facing instance as an argument and map them back
to internal methods.
Note that this module is currently shared and assumed to be stateless.
If this... | injectProfilingHooks | 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 getLaneLabelMap() {
{
var map = new Map();
var lane = 1;
for (var index = 0; index < TotalLanes; index++) {
var label = getLabelForLane(lane);
map.set(lane, label);
lane *= 2;
}
return map;
}
} | `ReactInstanceMap` maintains a mapping from a public facing stateful
instance (key) and the internal representation (value). This allows public
methods to accept the user facing instance as an argument and map them back
to internal methods.
Note that this module is currently shared and assumed to be stateless.
If this... | getLaneLabelMap | 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 markCommitStarted(lanes) {
{
if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markCommitStarted === 'function') {
injectedProfilingHooks.markCommitStarted(lanes);
}
}
} | `ReactInstanceMap` maintains a mapping from a public facing stateful
instance (key) and the internal representation (value). This allows public
methods to accept the user facing instance as an argument and map them back
to internal methods.
Note that this module is currently shared and assumed to be stateless.
If this... | markCommitStarted | 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 markCommitStopped() {
{
if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markCommitStopped === 'function') {
injectedProfilingHooks.markCommitStopped();
}
}
} | `ReactInstanceMap` maintains a mapping from a public facing stateful
instance (key) and the internal representation (value). This allows public
methods to accept the user facing instance as an argument and map them back
to internal methods.
Note that this module is currently shared and assumed to be stateless.
If this... | markCommitStopped | 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 markComponentRenderStarted(fiber) {
{
if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentRenderStarted === 'function') {
injectedProfilingHooks.markComponentRenderStarted(fiber);
}
}
} | `ReactInstanceMap` maintains a mapping from a public facing stateful
instance (key) and the internal representation (value). This allows public
methods to accept the user facing instance as an argument and map them back
to internal methods.
Note that this module is currently shared and assumed to be stateless.
If this... | markComponentRenderStarted | 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 markComponentRenderStopped() {
{
if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentRenderStopped === 'function') {
injectedProfilingHooks.markComponentRenderStopped();
}
}
} | `ReactInstanceMap` maintains a mapping from a public facing stateful
instance (key) and the internal representation (value). This allows public
methods to accept the user facing instance as an argument and map them back
to internal methods.
Note that this module is currently shared and assumed to be stateless.
If this... | markComponentRenderStopped | 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 markComponentPassiveEffectMountStarted(fiber) {
{
if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentPassiveEffectMountStarted === 'function') {
injectedProfilingHooks.markComponentPassiveEffectMountStarted(fiber);
}
}
} | `ReactInstanceMap` maintains a mapping from a public facing stateful
instance (key) and the internal representation (value). This allows public
methods to accept the user facing instance as an argument and map them back
to internal methods.
Note that this module is currently shared and assumed to be stateless.
If this... | markComponentPassiveEffectMountStarted | 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 markComponentPassiveEffectMountStopped() {
{
if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentPassiveEffectMountStopped === 'function') {
injectedProfilingHooks.markComponentPassiveEffectMountStopped();
}
}
} | `ReactInstanceMap` maintains a mapping from a public facing stateful
instance (key) and the internal representation (value). This allows public
methods to accept the user facing instance as an argument and map them back
to internal methods.
Note that this module is currently shared and assumed to be stateless.
If this... | markComponentPassiveEffectMountStopped | 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 markComponentPassiveEffectUnmountStarted(fiber) {
{
if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentPassiveEffectUnmountStarted === 'function') {
injectedProfilingHooks.markComponentPassiveEffectUnmountStarted(fiber);
}
}
} | `ReactInstanceMap` maintains a mapping from a public facing stateful
instance (key) and the internal representation (value). This allows public
methods to accept the user facing instance as an argument and map them back
to internal methods.
Note that this module is currently shared and assumed to be stateless.
If this... | markComponentPassiveEffectUnmountStarted | 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 markComponentPassiveEffectUnmountStopped() {
{
if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentPassiveEffectUnmountStopped === 'function') {
injectedProfilingHooks.markComponentPassiveEffectUnmountStopped();
}
}
} | `ReactInstanceMap` maintains a mapping from a public facing stateful
instance (key) and the internal representation (value). This allows public
methods to accept the user facing instance as an argument and map them back
to internal methods.
Note that this module is currently shared and assumed to be stateless.
If this... | markComponentPassiveEffectUnmountStopped | 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 markComponentLayoutEffectMountStarted(fiber) {
{
if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentLayoutEffectMountStarted === 'function') {
injectedProfilingHooks.markComponentLayoutEffectMountStarted(fiber);
}
}
} | `ReactInstanceMap` maintains a mapping from a public facing stateful
instance (key) and the internal representation (value). This allows public
methods to accept the user facing instance as an argument and map them back
to internal methods.
Note that this module is currently shared and assumed to be stateless.
If this... | markComponentLayoutEffectMountStarted | 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 markComponentLayoutEffectMountStopped() {
{
if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentLayoutEffectMountStopped === 'function') {
injectedProfilingHooks.markComponentLayoutEffectMountStopped();
}
}
} | `ReactInstanceMap` maintains a mapping from a public facing stateful
instance (key) and the internal representation (value). This allows public
methods to accept the user facing instance as an argument and map them back
to internal methods.
Note that this module is currently shared and assumed to be stateless.
If this... | markComponentLayoutEffectMountStopped | 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 markComponentLayoutEffectUnmountStarted(fiber) {
{
if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStarted === 'function') {
injectedProfilingHooks.markComponentLayoutEffectUnmountStarted(fiber);
}
}
} | `ReactInstanceMap` maintains a mapping from a public facing stateful
instance (key) and the internal representation (value). This allows public
methods to accept the user facing instance as an argument and map them back
to internal methods.
Note that this module is currently shared and assumed to be stateless.
If this... | markComponentLayoutEffectUnmountStarted | 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 markComponentLayoutEffectUnmountStopped() {
{
if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStopped === 'function') {
injectedProfilingHooks.markComponentLayoutEffectUnmountStopped();
}
}
} | `ReactInstanceMap` maintains a mapping from a public facing stateful
instance (key) and the internal representation (value). This allows public
methods to accept the user facing instance as an argument and map them back
to internal methods.
Note that this module is currently shared and assumed to be stateless.
If this... | markComponentLayoutEffectUnmountStopped | 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 markComponentErrored(fiber, thrownValue, lanes) {
{
if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentErrored === 'function') {
injectedProfilingHooks.markComponentErrored(fiber, thrownValue, lanes);
}
}
} | `ReactInstanceMap` maintains a mapping from a public facing stateful
instance (key) and the internal representation (value). This allows public
methods to accept the user facing instance as an argument and map them back
to internal methods.
Note that this module is currently shared and assumed to be stateless.
If this... | markComponentErrored | 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 markComponentSuspended(fiber, wakeable, lanes) {
{
if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentSuspended === 'function') {
injectedProfilingHooks.markComponentSuspended(fiber, wakeable, lanes);
}
}
} | `ReactInstanceMap` maintains a mapping from a public facing stateful
instance (key) and the internal representation (value). This allows public
methods to accept the user facing instance as an argument and map them back
to internal methods.
Note that this module is currently shared and assumed to be stateless.
If this... | markComponentSuspended | 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 markLayoutEffectsStarted(lanes) {
{
if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markLayoutEffectsStarted === 'function') {
injectedProfilingHooks.markLayoutEffectsStarted(lanes);
}
}
} | `ReactInstanceMap` maintains a mapping from a public facing stateful
instance (key) and the internal representation (value). This allows public
methods to accept the user facing instance as an argument and map them back
to internal methods.
Note that this module is currently shared and assumed to be stateless.
If this... | markLayoutEffectsStarted | 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 markLayoutEffectsStopped() {
{
if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markLayoutEffectsStopped === 'function') {
injectedProfilingHooks.markLayoutEffectsStopped();
}
}
} | `ReactInstanceMap` maintains a mapping from a public facing stateful
instance (key) and the internal representation (value). This allows public
methods to accept the user facing instance as an argument and map them back
to internal methods.
Note that this module is currently shared and assumed to be stateless.
If this... | markLayoutEffectsStopped | 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 markPassiveEffectsStarted(lanes) {
{
if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markPassiveEffectsStarted === 'function') {
injectedProfilingHooks.markPassiveEffectsStarted(lanes);
}
}
} | `ReactInstanceMap` maintains a mapping from a public facing stateful
instance (key) and the internal representation (value). This allows public
methods to accept the user facing instance as an argument and map them back
to internal methods.
Note that this module is currently shared and assumed to be stateless.
If this... | markPassiveEffectsStarted | 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 markPassiveEffectsStopped() {
{
if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markPassiveEffectsStopped === 'function') {
injectedProfilingHooks.markPassiveEffectsStopped();
}
}
} | `ReactInstanceMap` maintains a mapping from a public facing stateful
instance (key) and the internal representation (value). This allows public
methods to accept the user facing instance as an argument and map them back
to internal methods.
Note that this module is currently shared and assumed to be stateless.
If this... | markPassiveEffectsStopped | 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 markRenderStarted(lanes) {
{
if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markRenderStarted === 'function') {
injectedProfilingHooks.markRenderStarted(lanes);
}
}
} | `ReactInstanceMap` maintains a mapping from a public facing stateful
instance (key) and the internal representation (value). This allows public
methods to accept the user facing instance as an argument and map them back
to internal methods.
Note that this module is currently shared and assumed to be stateless.
If this... | markRenderStarted | 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 markRenderYielded() {
{
if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markRenderYielded === 'function') {
injectedProfilingHooks.markRenderYielded();
}
}
} | `ReactInstanceMap` maintains a mapping from a public facing stateful
instance (key) and the internal representation (value). This allows public
methods to accept the user facing instance as an argument and map them back
to internal methods.
Note that this module is currently shared and assumed to be stateless.
If this... | markRenderYielded | 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 markRenderStopped() {
{
if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markRenderStopped === 'function') {
injectedProfilingHooks.markRenderStopped();
}
}
} | `ReactInstanceMap` maintains a mapping from a public facing stateful
instance (key) and the internal representation (value). This allows public
methods to accept the user facing instance as an argument and map them back
to internal methods.
Note that this module is currently shared and assumed to be stateless.
If this... | markRenderStopped | 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 markRenderScheduled(lane) {
{
if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markRenderScheduled === 'function') {
injectedProfilingHooks.markRenderScheduled(lane);
}
}
} | `ReactInstanceMap` maintains a mapping from a public facing stateful
instance (key) and the internal representation (value). This allows public
methods to accept the user facing instance as an argument and map them back
to internal methods.
Note that this module is currently shared and assumed to be stateless.
If this... | markRenderScheduled | 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 markForceUpdateScheduled(fiber, lane) {
{
if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markForceUpdateScheduled === 'function') {
injectedProfilingHooks.markForceUpdateScheduled(fiber, lane);
}
}
} | `ReactInstanceMap` maintains a mapping from a public facing stateful
instance (key) and the internal representation (value). This allows public
methods to accept the user facing instance as an argument and map them back
to internal methods.
Note that this module is currently shared and assumed to be stateless.
If this... | markForceUpdateScheduled | 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 markStateUpdateScheduled(fiber, lane) {
{
if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markStateUpdateScheduled === 'function') {
injectedProfilingHooks.markStateUpdateScheduled(fiber, lane);
}
}
} | `ReactInstanceMap` maintains a mapping from a public facing stateful
instance (key) and the internal representation (value). This allows public
methods to accept the user facing instance as an argument and map them back
to internal methods.
Note that this module is currently shared and assumed to be stateless.
If this... | markStateUpdateScheduled | 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 clz32Fallback(x) {
var asUint = x >>> 0;
if (asUint === 0) {
return 32;
}
return 31 - (log(asUint) / LN2 | 0) | 0;
} | `ReactInstanceMap` maintains a mapping from a public facing stateful
instance (key) and the internal representation (value). This allows public
methods to accept the user facing instance as an argument and map them back
to internal methods.
Note that this module is currently shared and assumed to be stateless.
If this... | clz32Fallback | 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 getLabelForLane(lane) {
{
if (lane & SyncLane) {
return 'Sync';
}
if (lane & InputContinuousHydrationLane) {
return 'InputContinuousHydration';
}
if (lane & InputContinuousLane) {
return 'InputContinuous';
}
if (lane & DefaultHydrationLan... | `ReactInstanceMap` maintains a mapping from a public facing stateful
instance (key) and the internal representation (value). This allows public
methods to accept the user facing instance as an argument and map them back
to internal methods.
Note that this module is currently shared and assumed to be stateless.
If this... | getLabelForLane | 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 getHighestPriorityLanes(lanes) {
switch (getHighestPriorityLane(lanes)) {
case SyncLane:
return SyncLane;
case InputContinuousHydrationLane:
return InputContinuousHydrationLane;
case InputContinuousLane:
return InputContinuousLane;
case DefaultHydrationLan... | `ReactInstanceMap` maintains a mapping from a public facing stateful
instance (key) and the internal representation (value). This allows public
methods to accept the user facing instance as an argument and map them back
to internal methods.
Note that this module is currently shared and assumed to be stateless.
If this... | getHighestPriorityLanes | 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 getNextLanes(root, wipLanes) {
// Early bailout if there's no pending work left.
var pendingLanes = root.pendingLanes;
if (pendingLanes === NoLanes) {
return NoLanes;
}
var nextLanes = NoLanes;
var suspendedLanes = root.suspendedLanes;
var pingedLanes = root.pingedLanes; // ... | `ReactInstanceMap` maintains a mapping from a public facing stateful
instance (key) and the internal representation (value). This allows public
methods to accept the user facing instance as an argument and map them back
to internal methods.
Note that this module is currently shared and assumed to be stateless.
If this... | getNextLanes | 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 getMostRecentEventTime(root, lanes) {
var eventTimes = root.eventTimes;
var mostRecentEventTime = NoTimestamp;
while (lanes > 0) {
var index = pickArbitraryLaneIndex(lanes);
var lane = 1 << index;
var eventTime = eventTimes[index];
if (eventTime > mostRecentEventTime) {
... | `ReactInstanceMap` maintains a mapping from a public facing stateful
instance (key) and the internal representation (value). This allows public
methods to accept the user facing instance as an argument and map them back
to internal methods.
Note that this module is currently shared and assumed to be stateless.
If this... | getMostRecentEventTime | 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 computeExpirationTime(lane, currentTime) {
switch (lane) {
case SyncLane:
case InputContinuousHydrationLane:
case InputContinuousLane:
// User interactions should expire slightly more quickly.
//
// NOTE: This is set to the corresponding constant as in Scheduler.js... | `ReactInstanceMap` maintains a mapping from a public facing stateful
instance (key) and the internal representation (value). This allows public
methods to accept the user facing instance as an argument and map them back
to internal methods.
Note that this module is currently shared and assumed to be stateless.
If this... | computeExpirationTime | 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 markStarvedLanesAsExpired(root, currentTime) {
// TODO: This gets called every time we yield. We can optimize by storing
// the earliest expiration time on the root. Then use that to quickly bail out
// of this function.
var pendingLanes = root.pendingLanes;
var suspendedLanes = root.suspen... | `ReactInstanceMap` maintains a mapping from a public facing stateful
instance (key) and the internal representation (value). This allows public
methods to accept the user facing instance as an argument and map them back
to internal methods.
Note that this module is currently shared and assumed to be stateless.
If this... | markStarvedLanesAsExpired | 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 getHighestPriorityPendingLanes(root) {
return getHighestPriorityLanes(root.pendingLanes);
} | `ReactInstanceMap` maintains a mapping from a public facing stateful
instance (key) and the internal representation (value). This allows public
methods to accept the user facing instance as an argument and map them back
to internal methods.
Note that this module is currently shared and assumed to be stateless.
If this... | getHighestPriorityPendingLanes | 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 getLanesToRetrySynchronouslyOnError(root) {
var everythingButOffscreen = root.pendingLanes & ~OffscreenLane;
if (everythingButOffscreen !== NoLanes) {
return everythingButOffscreen;
}
if (everythingButOffscreen & OffscreenLane) {
return OffscreenLane;
}
return NoLanes;
... | `ReactInstanceMap` maintains a mapping from a public facing stateful
instance (key) and the internal representation (value). This allows public
methods to accept the user facing instance as an argument and map them back
to internal methods.
Note that this module is currently shared and assumed to be stateless.
If this... | getLanesToRetrySynchronouslyOnError | 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 includesSyncLane(lanes) {
return (lanes & SyncLane) !== NoLanes;
} | `ReactInstanceMap` maintains a mapping from a public facing stateful
instance (key) and the internal representation (value). This allows public
methods to accept the user facing instance as an argument and map them back
to internal methods.
Note that this module is currently shared and assumed to be stateless.
If this... | includesSyncLane | 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 includesNonIdleWork(lanes) {
return (lanes & NonIdleLanes) !== NoLanes;
} | `ReactInstanceMap` maintains a mapping from a public facing stateful
instance (key) and the internal representation (value). This allows public
methods to accept the user facing instance as an argument and map them back
to internal methods.
Note that this module is currently shared and assumed to be stateless.
If this... | includesNonIdleWork | 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 includesOnlyRetries(lanes) {
return (lanes & RetryLanes) === lanes;
} | `ReactInstanceMap` maintains a mapping from a public facing stateful
instance (key) and the internal representation (value). This allows public
methods to accept the user facing instance as an argument and map them back
to internal methods.
Note that this module is currently shared and assumed to be stateless.
If this... | includesOnlyRetries | 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 includesOnlyNonUrgentLanes(lanes) {
var UrgentLanes = SyncLane | InputContinuousLane | DefaultLane;
return (lanes & UrgentLanes) === NoLanes;
} | `ReactInstanceMap` maintains a mapping from a public facing stateful
instance (key) and the internal representation (value). This allows public
methods to accept the user facing instance as an argument and map them back
to internal methods.
Note that this module is currently shared and assumed to be stateless.
If this... | includesOnlyNonUrgentLanes | 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 includesOnlyTransitions(lanes) {
return (lanes & TransitionLanes) === lanes;
} | `ReactInstanceMap` maintains a mapping from a public facing stateful
instance (key) and the internal representation (value). This allows public
methods to accept the user facing instance as an argument and map them back
to internal methods.
Note that this module is currently shared and assumed to be stateless.
If this... | includesOnlyTransitions | 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 includesBlockingLane(root, lanes) {
var SyncDefaultLanes = InputContinuousHydrationLane | InputContinuousLane | DefaultHydrationLane | DefaultLane;
return (lanes & SyncDefaultLanes) !== NoLanes;
} | `ReactInstanceMap` maintains a mapping from a public facing stateful
instance (key) and the internal representation (value). This allows public
methods to accept the user facing instance as an argument and map them back
to internal methods.
Note that this module is currently shared and assumed to be stateless.
If this... | includesBlockingLane | 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 includesExpiredLane(root, lanes) {
// This is a separate check from includesBlockingLane because a lane can
// expire after a render has already started.
return (lanes & root.expiredLanes) !== NoLanes;
} | `ReactInstanceMap` maintains a mapping from a public facing stateful
instance (key) and the internal representation (value). This allows public
methods to accept the user facing instance as an argument and map them back
to internal methods.
Note that this module is currently shared and assumed to be stateless.
If this... | includesExpiredLane | 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 isTransitionLane(lane) {
return (lane & TransitionLanes) !== NoLanes;
} | `ReactInstanceMap` maintains a mapping from a public facing stateful
instance (key) and the internal representation (value). This allows public
methods to accept the user facing instance as an argument and map them back
to internal methods.
Note that this module is currently shared and assumed to be stateless.
If this... | isTransitionLane | 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 claimNextTransitionLane() {
// Cycle through the lanes, assigning each new transition to the next lane.
// In most cases, this means every transition gets its own lane, until we
// run out of lanes and cycle back to the beginning.
var lane = nextTransitionLane;
nextTransitionLane <<= 1;
... | `ReactInstanceMap` maintains a mapping from a public facing stateful
instance (key) and the internal representation (value). This allows public
methods to accept the user facing instance as an argument and map them back
to internal methods.
Note that this module is currently shared and assumed to be stateless.
If this... | claimNextTransitionLane | 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 claimNextRetryLane() {
var lane = nextRetryLane;
nextRetryLane <<= 1;
if ((nextRetryLane & RetryLanes) === NoLanes) {
nextRetryLane = RetryLane1;
}
return lane;
} | `ReactInstanceMap` maintains a mapping from a public facing stateful
instance (key) and the internal representation (value). This allows public
methods to accept the user facing instance as an argument and map them back
to internal methods.
Note that this module is currently shared and assumed to be stateless.
If this... | claimNextRetryLane | 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 getHighestPriorityLane(lanes) {
return lanes & -lanes;
} | `ReactInstanceMap` maintains a mapping from a public facing stateful
instance (key) and the internal representation (value). This allows public
methods to accept the user facing instance as an argument and map them back
to internal methods.
Note that this module is currently shared and assumed to be stateless.
If this... | getHighestPriorityLane | 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 pickArbitraryLane(lanes) {
// This wrapper function gets inlined. Only exists so to communicate that it
// doesn't matter which bit is selected; you can pick any bit without
// affecting the algorithms where its used. Here I'm using
// getHighestPriorityLane because it requires the fewest opera... | `ReactInstanceMap` maintains a mapping from a public facing stateful
instance (key) and the internal representation (value). This allows public
methods to accept the user facing instance as an argument and map them back
to internal methods.
Note that this module is currently shared and assumed to be stateless.
If this... | pickArbitraryLane | 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 pickArbitraryLaneIndex(lanes) {
return 31 - clz32(lanes);
} | `ReactInstanceMap` maintains a mapping from a public facing stateful
instance (key) and the internal representation (value). This allows public
methods to accept the user facing instance as an argument and map them back
to internal methods.
Note that this module is currently shared and assumed to be stateless.
If this... | pickArbitraryLaneIndex | 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 laneToIndex(lane) {
return pickArbitraryLaneIndex(lane);
} | `ReactInstanceMap` maintains a mapping from a public facing stateful
instance (key) and the internal representation (value). This allows public
methods to accept the user facing instance as an argument and map them back
to internal methods.
Note that this module is currently shared and assumed to be stateless.
If this... | laneToIndex | 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.