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 popPreviousToCommonLevel(prev, next) {
popNode(prev);
var parentPrev = prev.parent;
if (parentPrev === null) {
throw new Error("The depth must equal at least at zero before reaching the root. This is a bug in React.");
}
if (... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | popPreviousToCommonLevel | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function popNextToCommonLevel(prev, next) {
var parentNext = next.parent;
if (parentNext === null) {
throw new Error("The depth must equal at least at zero before reaching the root. This is a bug in React.");
}
if (prev.depth === parentNext.depth) ... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | popNextToCommonLevel | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function switchContext(newSnapshot) {
var prev = currentActiveSnapshot;
var next = newSnapshot;
if (prev !== next) {
if (prev === null) {
pushAllNext(next);
} else if (next === null) {
popAllPrevious(prev);
... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | switchContext | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function pushProvider(context, nextValue) {
var prevValue;
{
prevValue = context._currentValue2;
context._currentValue2 = nextValue;
{
if (context._currentRenderer2 !== void 0 && context._currentRenderer2 !== null && context._... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | pushProvider | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function popProvider(context) {
var prevSnapshot = currentActiveSnapshot;
if (prevSnapshot === null) {
throw new Error("Tried to pop a Context at the root of the app. This is a bug in React.");
}
{
if (prevSnapshot.context !== conte... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | popProvider | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function getActiveContext() {
return currentActiveSnapshot;
} | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | getActiveContext | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function readContext(context) {
var value = context._currentValue2;
return value;
} | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | readContext | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function get(key) {
return key._reactInternals;
} | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | get | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function set(key, value) {
key._reactInternals = value;
} | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | set | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function warnNoop(publicInstance, callerName) {
{
var _constructor = publicInstance.constructor;
var componentName = _constructor && getComponentNameFromType(_constructor) || "ReactClass";
var warningKey = componentName + "." + callerName;
if... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | warnNoop | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function applyDerivedStateFromProps(instance, ctor, getDerivedStateFromProps, prevState, nextProps) {
var partialState = getDerivedStateFromProps(nextProps, prevState);
{
warnOnUndefinedDerivedState(ctor, partialState);
}
var newState = partialStat... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | applyDerivedStateFromProps | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function constructClassInstance(ctor, props, maskedLegacyContext) {
var context = emptyContextObject;
var contextType = ctor.contextType;
{
if ("contextType" in ctor) {
var isValid = (
// Allow null for conditional declarati... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | constructClassInstance | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function checkClassInstance(instance, ctor, newProps) {
{
var name = getComponentNameFromType(ctor) || "Component";
var renderPresent = instance.render;
if (!renderPresent) {
if (ctor.prototype && typeof ctor.prototype.render === "function"... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | checkClassInstance | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function callComponentWillMount(type, instance) {
var oldState = instance.state;
if (typeof instance.componentWillMount === "function") {
{
if (instance.componentWillMount.__suppressDeprecationWarning !== true) {
var componentName = getCo... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | callComponentWillMount | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function processUpdateQueue(internalInstance, inst, props, maskedLegacyContext) {
if (internalInstance.queue !== null && internalInstance.queue.length > 0) {
var oldQueue = internalInstance.queue;
var oldReplace = internalInstance.replace;
internalInstance.q... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | processUpdateQueue | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function mountClassInstance(instance, ctor, newProps, maskedLegacyContext) {
{
checkClassInstance(instance, ctor, newProps);
}
var initialState = instance.state !== void 0 ? instance.state : null;
instance.updater = classComponentUpdater;
... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | mountClassInstance | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function getTreeId(context) {
var overflow = context.overflow;
var idWithLeadingBit = context.id;
var id = idWithLeadingBit & ~getLeadingBit(idWithLeadingBit);
return id.toString(32) + overflow;
} | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | getTreeId | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function pushTreeContext(baseContext, totalChildren, index) {
var baseIdWithLeadingBit = baseContext.id;
var baseOverflow = baseContext.overflow;
var baseLength = getBitLength(baseIdWithLeadingBit) - 1;
var baseId = baseIdWithLeadingBit & ~(1 << baseLength);
... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | pushTreeContext | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function getBitLength(number) {
return 32 - clz32(number);
} | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | getBitLength | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function getLeadingBit(id) {
return 1 << getBitLength(id) - 1;
} | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | getLeadingBit | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function clz32Fallback(x) {
var asUint = x >>> 0;
if (asUint === 0) {
return 32;
}
return 31 - (log(asUint) / LN2 | 0) | 0;
} | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | clz32Fallback | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function is(x, y) {
return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y;
} | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | is | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function resolveCurrentlyRenderingComponent() {
if (currentlyRenderingComponent === null) {
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:\n1. You might have mismatching versions o... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | resolveCurrentlyRenderingComponent | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function areHookInputsEqual(nextDeps, prevDeps) {
if (prevDeps === null) {
{
error("%s received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.", currentHookNameIn... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | areHookInputsEqual | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function createHook() {
if (numberOfReRenders > 0) {
throw new Error("Rendered more hooks than during the previous render");
}
return {
memoizedState: null,
queue: null,
next: null
};
} | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | createHook | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function createWorkInProgressHook() {
if (workInProgressHook === null) {
if (firstWorkInProgressHook === null) {
isReRender = false;
firstWorkInProgressHook = workInProgressHook = createHook();
} else {
isReRender = true... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | createWorkInProgressHook | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function prepareToUseHooks(task, componentIdentity) {
currentlyRenderingComponent = componentIdentity;
currentlyRenderingTask = task;
{
isInHookUserCodeInDev = false;
}
localIdCounter = 0;
} | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | prepareToUseHooks | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function finishHooks(Component, props, children, refOrContext) {
while (didScheduleRenderPhaseUpdate) {
didScheduleRenderPhaseUpdate = false;
localIdCounter = 0;
numberOfReRenders += 1;
workInProgressHook = null;
children = Co... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | finishHooks | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function checkDidRenderIdHook() {
var didRenderIdHook = localIdCounter !== 0;
return didRenderIdHook;
} | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | checkDidRenderIdHook | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function resetHooksState() {
{
isInHookUserCodeInDev = false;
}
currentlyRenderingComponent = null;
currentlyRenderingTask = null;
didScheduleRenderPhaseUpdate = false;
firstWorkInProgressHook = null;
numbe... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | resetHooksState | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function readContext$1(context) {
{
if (isInHookUserCodeInDev) {
error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, ... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | readContext$1 | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function useContext(context) {
{
currentHookNameInDev = "useContext";
}
resolveCurrentlyRenderingComponent();
return readContext(context);
} | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | useContext | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function basicStateReducer(state, action) {
return typeof action === "function" ? action(state) : action;
} | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | basicStateReducer | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function useState(initialState) {
{
currentHookNameInDev = "useState";
}
return useReducer(
basicStateReducer,
// useReducer has a special case to support lazy useState initializers
initialState
);
... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | useState | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function useReducer(reducer, initialArg, init) {
{
if (reducer !== basicStateReducer) {
currentHookNameInDev = "useReducer";
}
}
currentlyRenderingComponent = resolveCurrentlyRenderingComponent();
workInProgressHoo... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | useReducer | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function useMemo(nextCreate, deps) {
currentlyRenderingComponent = resolveCurrentlyRenderingComponent();
workInProgressHook = createWorkInProgressHook();
var nextDeps = deps === void 0 ? null : deps;
if (workInProgressHook !== null) {
var prevState... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | useMemo | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function useRef(initialValue) {
currentlyRenderingComponent = resolveCurrentlyRenderingComponent();
workInProgressHook = createWorkInProgressHook();
var previousRef = workInProgressHook.memoizedState;
if (previousRef === null) {
var ref = {
... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | useRef | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function useLayoutEffect(create, inputs) {
{
currentHookNameInDev = "useLayoutEffect";
error("useLayoutEffect does nothing on the server, because its effect cannot be encoded into the server renderer's output format. This will lead to a mismatch between the initial, non-hyd... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | useLayoutEffect | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function dispatchAction(componentIdentity, queue, action) {
if (numberOfReRenders >= RE_RENDER_LIMIT) {
throw new Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");
}
if (componentIdentity === currentlyRenderingCompone... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | dispatchAction | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function useCallback(callback, deps) {
return useMemo(function() {
return callback;
}, deps);
} | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | useCallback | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function useMutableSource(source, getSnapshot, subscribe) {
resolveCurrentlyRenderingComponent();
return getSnapshot(source._source);
} | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | useMutableSource | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {
if (getServerSnapshot === void 0) {
throw new Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");
}
return getServerSnapsh... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | useSyncExternalStore | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function useDeferredValue(value) {
resolveCurrentlyRenderingComponent();
return value;
} | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | useDeferredValue | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function unsupportedStartTransition() {
throw new Error("startTransition cannot be called during server rendering.");
} | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | unsupportedStartTransition | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function useTransition() {
resolveCurrentlyRenderingComponent();
return [false, unsupportedStartTransition];
} | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | useTransition | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function useId() {
var task = currentlyRenderingTask;
var treeId = getTreeId(task.treeContext);
var responseState = currentResponseState;
if (responseState === null) {
throw new Error("Invalid hook call. Hooks can only be called inside of the body ... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | useId | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function setCurrentResponseState(responseState) {
currentResponseState = responseState;
} | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | setCurrentResponseState | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function getStackByComponentStackNode(componentStack) {
try {
var info = "";
var node = componentStack;
do {
switch (node.tag) {
case 0:
info += describeBuiltInComponentFrame(node.type, null, null);... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | getStackByComponentStackNode | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function defaultErrorHandler(error2) {
console["error"](error2);
return null;
} | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | defaultErrorHandler | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function createRequest(children, responseState, rootFormatContext, progressiveChunkSize, onError2, onAllReady, onShellReady, onShellError, onFatalError) {
var pingedTasks = [];
var abortSet = /* @__PURE__ */ new Set();
var request = {
destination: null,
... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | createRequest | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function pingTask(request, task) {
var pingedTasks = request.pingedTasks;
pingedTasks.push(task);
if (pingedTasks.length === 1) {
scheduleWork(function() {
return performWork(request);
});
}
} | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | pingTask | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function createSuspenseBoundary(request, fallbackAbortableTasks) {
return {
id: UNINITIALIZED_SUSPENSE_BOUNDARY_ID,
rootSegmentID: -1,
parentFlushed: false,
pendingTasks: 0,
forceClientRender: false,
completedS... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | createSuspenseBoundary | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function createTask(request, node, blockedBoundary, blockedSegment, abortSet, legacyContext, context, treeContext) {
request.allPendingTasks++;
if (blockedBoundary === null) {
request.pendingRootTasks++;
} else {
blockedBoundary.pendingTasks++;
... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | createTask | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function createPendingSegment(request, index, boundary, formatContext, lastPushedText, textEmbedded) {
return {
status: PENDING,
id: -1,
// lazily assigned later
index,
parentFlushed: false,
chunks: [],
... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | createPendingSegment | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function getCurrentStackInDEV() {
{
if (currentTaskInDEV === null || currentTaskInDEV.componentStack === null) {
return "";
}
return getStackByComponentStackNode(currentTaskInDEV.componentStack);
}
} | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | getCurrentStackInDEV | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function pushBuiltInComponentStackInDEV(task, type) {
{
task.componentStack = {
tag: 0,
parent: task.componentStack,
type
};
}
} | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | pushBuiltInComponentStackInDEV | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function pushFunctionComponentStackInDEV(task, type) {
{
task.componentStack = {
tag: 1,
parent: task.componentStack,
type
};
}
} | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | pushFunctionComponentStackInDEV | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function pushClassComponentStackInDEV(task, type) {
{
task.componentStack = {
tag: 2,
parent: task.componentStack,
type
};
}
} | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | pushClassComponentStackInDEV | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function popComponentStackInDEV(task) {
{
if (task.componentStack === null) {
error("Unexpectedly popped too many stack frames. This is a bug in React.");
} else {
task.componentStack = task.componentStack.parent;
}
... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | popComponentStackInDEV | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function captureBoundaryErrorDetailsDev(boundary, error2) {
{
var errorMessage;
if (typeof error2 === "string") {
errorMessage = error2;
} else if (error2 && typeof error2.message === "string") {
errorMessage = error2.mess... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | captureBoundaryErrorDetailsDev | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function logRecoverableError(request, error2) {
var errorDigest = request.onError(error2);
if (errorDigest != null && typeof errorDigest !== "string") {
throw new Error('onError returned something with a type other than "string". onError should return a string and may return ... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | logRecoverableError | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function fatalError(request, error2) {
var onShellError = request.onShellError;
onShellError(error2);
var onFatalError = request.onFatalError;
onFatalError(error2);
if (request.destination !== null) {
request.status = CLOSED;
... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | fatalError | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function renderSuspenseBoundary(request, task, props) {
pushBuiltInComponentStackInDEV(task, "Suspense");
var parentBoundary = task.blockedBoundary;
var parentSegment = task.blockedSegment;
var fallback = props.fallback;
var content = props.children;... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | renderSuspenseBoundary | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function renderHostElement(request, task, type, props) {
pushBuiltInComponentStackInDEV(task, type);
var segment = task.blockedSegment;
var children = pushStartInstance(segment.chunks, type, props, request.responseState, segment.formatContext);
segment.lastPushedT... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | renderHostElement | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function shouldConstruct$1(Component) {
return Component.prototype && Component.prototype.isReactComponent;
} | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | shouldConstruct$1 | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function renderWithHooks(request, task, Component, props, secondArg) {
var componentIdentity = {};
prepareToUseHooks(task, componentIdentity);
var result = Component(props, secondArg);
return finishHooks(Component, props, result, secondArg);
} | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | renderWithHooks | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function finishClassComponent(request, task, instance, Component, props) {
var nextChildren = instance.render();
{
if (instance.props !== props) {
if (!didWarnAboutReassigningProps) {
error("It looks like %s is reassigning its own `this.p... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | finishClassComponent | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function renderClassComponent(request, task, Component, props) {
pushClassComponentStackInDEV(task, Component);
var maskedContext = getMaskedContext(Component, task.legacyContext);
var instance = constructClassInstance(Component, props, maskedContext);
mountClassI... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | renderClassComponent | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function renderIndeterminateComponent(request, task, Component, props) {
var legacyContext;
{
legacyContext = getMaskedContext(Component, task.legacyContext);
}
pushFunctionComponentStackInDEV(task, Component);
{
if (C... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | renderIndeterminateComponent | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function validateFunctionComponentInDev(Component) {
{
if (Component) {
if (Component.childContextTypes) {
error("%s(...): childContextTypes cannot be defined on a function component.", Component.displayName || Component.name || "Component");
... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | validateFunctionComponentInDev | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function resolveDefaultProps(Component, baseProps) {
if (Component && Component.defaultProps) {
var props = assign({}, baseProps);
var defaultProps = Component.defaultProps;
for (var propName in defaultProps) {
if (props[propName] === void ... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | resolveDefaultProps | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function renderForwardRef(request, task, type, props, ref) {
pushFunctionComponentStackInDEV(task, type.render);
var children = renderWithHooks(request, task, type.render, props, ref);
var hasId = checkDidRenderIdHook();
if (hasId) {
var prevTreeCo... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | renderForwardRef | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function renderMemo(request, task, type, props, ref) {
var innerType = type.type;
var resolvedProps = resolveDefaultProps(innerType, props);
renderElement(request, task, innerType, resolvedProps, ref);
} | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | renderMemo | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function renderContextConsumer(request, task, context, props) {
{
if (context._context === void 0) {
if (context !== context.Consumer) {
if (!hasWarnedAboutUsingContextAsConsumer) {
hasWarnedAboutUsingContextAsConsumer = true;
... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | renderContextConsumer | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function renderContextProvider(request, task, type, props) {
var context = type._context;
var value = props.value;
var children = props.children;
var prevSnapshot;
{
prevSnapshot = task.context;
}
task.cont... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | renderContextProvider | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function renderLazyComponent(request, task, lazyComponent, props, ref) {
pushBuiltInComponentStackInDEV(task, "Lazy");
var payload = lazyComponent._payload;
var init = lazyComponent._init;
var Component = init(payload);
var resolvedProps = resolveDef... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | renderLazyComponent | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function renderElement(request, task, type, props, ref) {
if (typeof type === "function") {
if (shouldConstruct$1(type)) {
renderClassComponent(request, task, type, props);
return;
} else {
renderIndeterminateComponent(r... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | renderElement | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function validateIterable(iterable, iteratorFn) {
{
if (typeof Symbol === "function" && // $FlowFixMe Flow doesn't know about toStringTag
iterable[Symbol.toStringTag] === "Generator") {
if (!didWarnAboutGenerators) {
error("Using Genera... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | validateIterable | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function renderNodeDestructive(request, task, node) {
{
try {
return renderNodeDestructiveImpl(request, task, node);
} catch (x) {
if (typeof x === "object" && x !== null && typeof x.then === "function")
;
... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | renderNodeDestructive | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function renderNodeDestructiveImpl(request, task, node) {
task.node = node;
if (typeof node === "object" && node !== null) {
switch (node.$$typeof) {
case REACT_ELEMENT_TYPE: {
var element = node;
var type = element.ty... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | renderNodeDestructiveImpl | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function renderChildrenArray(request, task, children) {
var totalChildren = children.length;
for (var i = 0; i < totalChildren; i++) {
var prevTreeContext = task.treeContext;
task.treeContext = pushTreeContext(prevTreeContext, totalChildren, i);
... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | renderChildrenArray | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function spawnNewSuspendedTask(request, task, x) {
var segment = task.blockedSegment;
var insertionIndex = segment.chunks.length;
var newSegment = createPendingSegment(
request,
insertionIndex,
null,
segment.format... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | spawnNewSuspendedTask | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function renderNode(request, task, node) {
var previousFormatContext = task.blockedSegment.formatContext;
var previousLegacyContext = task.legacyContext;
var previousContext = task.context;
var previousComponentStack = null;
{
previou... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | renderNode | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function erroredTask(request, boundary, segment, error2) {
var errorDigest = logRecoverableError(request, error2);
if (boundary === null) {
fatalError(request, error2);
} else {
boundary.pendingTasks--;
if (!boundary.forceClientRe... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | erroredTask | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function abortTaskSoft(task) {
var request = this;
var boundary = task.blockedBoundary;
var segment = task.blockedSegment;
segment.status = ABORTED;
finishedTask(request, boundary, segment);
} | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | abortTaskSoft | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function abortTask(task, request, reason) {
var boundary = task.blockedBoundary;
var segment = task.blockedSegment;
segment.status = ABORTED;
if (boundary === null) {
request.allPendingTasks--;
if (request.status !== CLOSED) {
... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | abortTask | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function queueCompletedSegment(boundary, segment) {
if (segment.chunks.length === 0 && segment.children.length === 1 && segment.children[0].boundary === null) {
var childSegment = segment.children[0];
childSegment.id = segment.id;
childSegment.parentFlushed ... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | queueCompletedSegment | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function finishedTask(request, boundary, segment) {
if (boundary === null) {
if (segment.parentFlushed) {
if (request.completedRootSegment !== null) {
throw new Error("There can only be one root segment. This is a bug in React.");
}
... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | finishedTask | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function retryTask(request, task) {
var segment = task.blockedSegment;
if (segment.status !== PENDING) {
return;
}
switchContext(task.context);
var prevTaskInDEV = null;
{
prevTaskInDEV = currentTaskInDEV... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | retryTask | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function performWork(request) {
if (request.status === CLOSED) {
return;
}
var prevContext = getActiveContext();
var prevDispatcher = ReactCurrentDispatcher$1.current;
ReactCurrentDispatcher$1.current = Dispatcher;
var p... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | performWork | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function flushSubtree(request, destination, segment) {
segment.parentFlushed = true;
switch (segment.status) {
case PENDING: {
var segmentID = segment.id = request.nextSegmentId++;
segment.lastPushedText = false;
segment.t... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | flushSubtree | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function flushSegment(request, destination, segment) {
var boundary = segment.boundary;
if (boundary === null) {
return flushSubtree(request, destination, segment);
}
boundary.parentFlushed = true;
if (boundary.forceClientRender) {
... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | flushSegment | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function flushClientRenderedBoundary(request, destination, boundary) {
return writeClientRenderBoundaryInstruction(destination, request.responseState, boundary.id, boundary.errorDigest, boundary.errorMessage, boundary.errorComponentStack);
} | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | flushClientRenderedBoundary | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function flushSegmentContainer(request, destination, segment) {
writeStartSegment(destination, request.responseState, segment.formatContext, segment.id);
flushSegment(request, destination, segment);
return writeEndSegment(destination, segment.formatContext);
} | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | flushSegmentContainer | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function flushCompletedBoundary(request, destination, boundary) {
var completedSegments = boundary.completedSegments;
var i = 0;
for (; i < completedSegments.length; i++) {
var segment = completedSegments[i];
flushPartiallyCompletedSegment(reques... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | flushCompletedBoundary | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function flushPartialBoundary(request, destination, boundary) {
var completedSegments = boundary.completedSegments;
var i = 0;
for (; i < completedSegments.length; i++) {
var segment = completedSegments[i];
if (!flushPartiallyCompletedSegment(req... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | flushPartialBoundary | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function flushPartiallyCompletedSegment(request, destination, boundary, segment) {
if (segment.status === FLUSHED) {
return true;
}
var segmentID = segment.id;
if (segmentID === -1) {
var rootSegmentID = segment.id = boundary.rootSe... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | flushPartiallyCompletedSegment | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function flushCompletedQueues(request, destination) {
try {
var completedRootSegment = request.completedRootSegment;
if (completedRootSegment !== null && request.pendingRootTasks === 0) {
flushSegment(request, destination, completedRootSegment);
... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | flushCompletedQueues | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function startWork(request) {
scheduleWork(function() {
return performWork(request);
});
} | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | startWork | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
function startFlowing(request, destination) {
if (request.status === CLOSING) {
request.status = CLOSED;
closeWithError(destination, request.fatalError);
return;
}
if (request.status === CLOSED) {
return;
... | Sets a subset of the state. This only exists because _pendingState is
internal. This provides a merging strategy that is not available to deep
properties which is confusing. TODO: Expose pendingState or don't use it
during the merge.
@param {ReactClass} publicInstance The instance that should rerender.
@param {object}... | startFlowing | javascript | wasmerio/winterjs | tests/complex.js | https://github.com/wasmerio/winterjs/blob/master/tests/complex.js | MIT |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.