React sync for revisions abce30f...b5ac963
Reviewed By: sophiebits Differential Revision: D5853012 fbshipit-source-id: d0ebf12d2c801dc3e232fe18f9cc25e477812350
This commit is contained in:
parent
9d9e250d28
commit
8bf8b21613
|
@ -1 +1 @@
|
||||||
abce30f771e07670b3efac6ffdcab1a7139556a9
|
b5ac963fb791d1298e7f396236383bc955f916c1
|
|
@ -876,7 +876,9 @@ __DEV__ && function() {
|
||||||
function popContextProvider(fiber) {
|
function popContextProvider(fiber) {
|
||||||
isContextProvider$1(fiber) && (pop(didPerformWorkStackCursor, fiber), pop(contextStackCursor, fiber));
|
isContextProvider$1(fiber) && (pop(didPerformWorkStackCursor, fiber), pop(contextStackCursor, fiber));
|
||||||
}
|
}
|
||||||
var popContextProvider_1 = popContextProvider, pushTopLevelContextObject = function(fiber, context, didChange) {
|
var popContextProvider_1 = popContextProvider, popTopLevelContextObject = function(fiber) {
|
||||||
|
pop(didPerformWorkStackCursor, fiber), pop(contextStackCursor, fiber);
|
||||||
|
}, pushTopLevelContextObject = function(fiber, context, didChange) {
|
||||||
invariant(null == contextStackCursor.cursor, "Unexpected context found on stack. " + "This error is likely caused by a bug in React. Please file an issue."),
|
invariant(null == contextStackCursor.cursor, "Unexpected context found on stack. " + "This error is likely caused by a bug in React. Please file an issue."),
|
||||||
push(contextStackCursor, context, fiber), push(didPerformWorkStackCursor, didChange, fiber);
|
push(contextStackCursor, context, fiber), push(didPerformWorkStackCursor, didChange, fiber);
|
||||||
};
|
};
|
||||||
|
@ -930,6 +932,7 @@ __DEV__ && function() {
|
||||||
isContextConsumer: isContextConsumer_1,
|
isContextConsumer: isContextConsumer_1,
|
||||||
isContextProvider: isContextProvider_1,
|
isContextProvider: isContextProvider_1,
|
||||||
popContextProvider: popContextProvider_1,
|
popContextProvider: popContextProvider_1,
|
||||||
|
popTopLevelContextObject: popTopLevelContextObject,
|
||||||
pushTopLevelContextObject: pushTopLevelContextObject,
|
pushTopLevelContextObject: pushTopLevelContextObject,
|
||||||
processChildContext: processChildContext_1,
|
processChildContext: processChildContext_1,
|
||||||
pushContextProvider: pushContextProvider,
|
pushContextProvider: pushContextProvider,
|
||||||
|
@ -968,7 +971,7 @@ __DEV__ && function() {
|
||||||
workInProgress.type = current.type, workInProgress.stateNode = current.stateNode,
|
workInProgress.type = current.type, workInProgress.stateNode = current.stateNode,
|
||||||
workInProgress._debugID = current._debugID, workInProgress._debugSource = current._debugSource,
|
workInProgress._debugID = current._debugID, workInProgress._debugSource = current._debugSource,
|
||||||
workInProgress._debugOwner = current._debugOwner, workInProgress.alternate = current,
|
workInProgress._debugOwner = current._debugOwner, workInProgress.alternate = current,
|
||||||
current.alternate = workInProgress) : (workInProgress.effectTag = NoWork$1, workInProgress.nextEffect = null,
|
current.alternate = workInProgress) : (workInProgress.effectTag = NoEffect$1, workInProgress.nextEffect = null,
|
||||||
workInProgress.firstEffect = null, workInProgress.lastEffect = null), workInProgress.pendingWorkPriority = renderPriority,
|
workInProgress.firstEffect = null, workInProgress.lastEffect = null), workInProgress.pendingWorkPriority = renderPriority,
|
||||||
workInProgress.child = current.child, workInProgress.memoizedProps = current.memoizedProps,
|
workInProgress.child = current.child, workInProgress.memoizedProps = current.memoizedProps,
|
||||||
workInProgress.memoizedState = current.memoizedState, workInProgress.updateQueue = current.updateQueue,
|
workInProgress.memoizedState = current.memoizedState, workInProgress.updateQueue = current.updateQueue,
|
||||||
|
@ -1530,7 +1533,7 @@ __DEV__ && function() {
|
||||||
Object.defineProperty(fakeInternalInstance, "_processChildContext", {
|
Object.defineProperty(fakeInternalInstance, "_processChildContext", {
|
||||||
enumerable: !1,
|
enumerable: !1,
|
||||||
value: function() {
|
value: function() {
|
||||||
invariant(!1, "_processChildContext is not available in React 16+. This likely " + "means you have multiple copies of React and are attempting to nest " + "a React 15 tree inside a React 16 tree using " + "unstable_renderSubtreeIntoContainer, which isn't supported. Try " + "to make sure you have only one copy of React (and ideally, switch " + "to ReactDOM.unstable_createPortal).");
|
invariant(!1, "_processChildContext is not available in React 16+. This likely " + "means you have multiple copies of React and are attempting to nest " + "a React 15 tree inside a React 16 tree using " + "unstable_renderSubtreeIntoContainer, which isn't supported. Try " + "to make sure you have only one copy of React (and ideally, switch " + "to ReactDOM.createPortal).");
|
||||||
}
|
}
|
||||||
}), Object.freeze(fakeInternalInstance);
|
}), Object.freeze(fakeInternalInstance);
|
||||||
var ReactFiberClassComponent = function(scheduleUpdate, getPriorityContext, memoizeProps, memoizeState) {
|
var ReactFiberClassComponent = function(scheduleUpdate, getPriorityContext, memoizeProps, memoizeState) {
|
||||||
|
@ -1698,10 +1701,13 @@ __DEV__ && function() {
|
||||||
memoizeProps(workInProgress, instance.props), hasContext && invalidateContextProvider$1(workInProgress, !0),
|
memoizeProps(workInProgress, instance.props), hasContext && invalidateContextProvider$1(workInProgress, !0),
|
||||||
workInProgress.child;
|
workInProgress.child;
|
||||||
}
|
}
|
||||||
function updateHostRoot(current, workInProgress, priorityLevel) {
|
function pushHostRootContext(workInProgress) {
|
||||||
var root = workInProgress.stateNode;
|
var root = workInProgress.stateNode;
|
||||||
root.pendingContext ? pushTopLevelContextObject$1(workInProgress, root.pendingContext, root.pendingContext !== root.context) : root.context && pushTopLevelContextObject$1(workInProgress, root.context, !1),
|
root.pendingContext ? pushTopLevelContextObject$1(workInProgress, root.pendingContext, root.pendingContext !== root.context) : root.context && pushTopLevelContextObject$1(workInProgress, root.context, !1),
|
||||||
pushHostContainer(workInProgress, root.containerInfo);
|
pushHostContainer(workInProgress, root.containerInfo);
|
||||||
|
}
|
||||||
|
function updateHostRoot(current, workInProgress, priorityLevel) {
|
||||||
|
pushHostRootContext(workInProgress);
|
||||||
var updateQueue = workInProgress.updateQueue;
|
var updateQueue = workInProgress.updateQueue;
|
||||||
if (null !== updateQueue) {
|
if (null !== updateQueue) {
|
||||||
var prevState = workInProgress.memoizedState, state = beginUpdateQueue$1(current, workInProgress, updateQueue, null, prevState, null, priorityLevel);
|
var prevState = workInProgress.memoizedState, state = beginUpdateQueue$1(current, workInProgress, updateQueue, null, prevState, null, priorityLevel);
|
||||||
|
@ -1779,6 +1785,10 @@ __DEV__ && function() {
|
||||||
}
|
}
|
||||||
function bailoutOnLowPriority(current, workInProgress) {
|
function bailoutOnLowPriority(current, workInProgress) {
|
||||||
switch (cancelWorkTimer(workInProgress), workInProgress.tag) {
|
switch (cancelWorkTimer(workInProgress), workInProgress.tag) {
|
||||||
|
case HostRoot$6:
|
||||||
|
pushHostRootContext(workInProgress);
|
||||||
|
break;
|
||||||
|
|
||||||
case ClassComponent$6:
|
case ClassComponent$6:
|
||||||
pushContextProvider$1(workInProgress);
|
pushContextProvider$1(workInProgress);
|
||||||
break;
|
break;
|
||||||
|
@ -1841,8 +1851,7 @@ __DEV__ && function() {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case HostRoot$6:
|
case HostRoot$6:
|
||||||
var root = workInProgress.stateNode;
|
pushHostRootContext(workInProgress);
|
||||||
pushHostContainer(workInProgress, root.containerInfo);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -1861,7 +1870,7 @@ __DEV__ && function() {
|
||||||
beginWork: beginWork,
|
beginWork: beginWork,
|
||||||
beginFailedWork: beginFailedWork
|
beginFailedWork: beginFailedWork
|
||||||
};
|
};
|
||||||
}, reconcileChildFibers$2 = ReactChildFiber.reconcileChildFibers, popContextProvider$2 = ReactFiberContext.popContextProvider, IndeterminateComponent$3 = ReactTypeOfWork.IndeterminateComponent, FunctionalComponent$3 = ReactTypeOfWork.FunctionalComponent, ClassComponent$8 = ReactTypeOfWork.ClassComponent, HostRoot$7 = ReactTypeOfWork.HostRoot, HostComponent$7 = ReactTypeOfWork.HostComponent, HostText$5 = ReactTypeOfWork.HostText, HostPortal$6 = ReactTypeOfWork.HostPortal, CoroutineComponent$3 = ReactTypeOfWork.CoroutineComponent, CoroutineHandlerPhase$1 = ReactTypeOfWork.CoroutineHandlerPhase, YieldComponent$4 = ReactTypeOfWork.YieldComponent, Fragment$4 = ReactTypeOfWork.Fragment, Placement$4 = ReactTypeOfSideEffect.Placement, Ref$2 = ReactTypeOfSideEffect.Ref, Update$2 = ReactTypeOfSideEffect.Update, OffscreenPriority$2 = ReactPriorityLevel.OffscreenPriority, ReactDebugCurrentFiber$5 = ReactDebugCurrentFiber_1, ReactFiberCompleteWork = function(config, hostContext, hydrationContext) {
|
}, reconcileChildFibers$2 = ReactChildFiber.reconcileChildFibers, popContextProvider$2 = ReactFiberContext.popContextProvider, popTopLevelContextObject$1 = ReactFiberContext.popTopLevelContextObject, IndeterminateComponent$3 = ReactTypeOfWork.IndeterminateComponent, FunctionalComponent$3 = ReactTypeOfWork.FunctionalComponent, ClassComponent$8 = ReactTypeOfWork.ClassComponent, HostRoot$7 = ReactTypeOfWork.HostRoot, HostComponent$7 = ReactTypeOfWork.HostComponent, HostText$5 = ReactTypeOfWork.HostText, HostPortal$6 = ReactTypeOfWork.HostPortal, CoroutineComponent$3 = ReactTypeOfWork.CoroutineComponent, CoroutineHandlerPhase$1 = ReactTypeOfWork.CoroutineHandlerPhase, YieldComponent$4 = ReactTypeOfWork.YieldComponent, Fragment$4 = ReactTypeOfWork.Fragment, Placement$4 = ReactTypeOfSideEffect.Placement, Ref$2 = ReactTypeOfSideEffect.Ref, Update$2 = ReactTypeOfSideEffect.Update, OffscreenPriority$2 = ReactPriorityLevel.OffscreenPriority, ReactDebugCurrentFiber$5 = ReactDebugCurrentFiber_1, ReactFiberCompleteWork = function(config, hostContext, hydrationContext) {
|
||||||
var createInstance = config.createInstance, createTextInstance = config.createTextInstance, appendInitialChild = config.appendInitialChild, finalizeInitialChildren = config.finalizeInitialChildren, prepareUpdate = config.prepareUpdate, getRootHostContainer = hostContext.getRootHostContainer, popHostContext = hostContext.popHostContext, getHostContext = hostContext.getHostContext, popHostContainer = hostContext.popHostContainer, prepareToHydrateHostInstance = hydrationContext.prepareToHydrateHostInstance, prepareToHydrateHostTextInstance = hydrationContext.prepareToHydrateHostTextInstance, popHydrationState = hydrationContext.popHydrationState;
|
var createInstance = config.createInstance, createTextInstance = config.createTextInstance, appendInitialChild = config.appendInitialChild, finalizeInitialChildren = config.finalizeInitialChildren, prepareUpdate = config.prepareUpdate, getRootHostContainer = hostContext.getRootHostContainer, popHostContext = hostContext.popHostContext, getHostContext = hostContext.getHostContext, popHostContainer = hostContext.popHostContainer, prepareToHydrateHostInstance = hydrationContext.prepareToHydrateHostInstance, prepareToHydrateHostTextInstance = hydrationContext.prepareToHydrateHostTextInstance, popHydrationState = hydrationContext.popHydrationState;
|
||||||
function markUpdate(workInProgress) {
|
function markUpdate(workInProgress) {
|
||||||
workInProgress.effectTag |= Update$2;
|
workInProgress.effectTag |= Update$2;
|
||||||
|
@ -1919,6 +1928,7 @@ __DEV__ && function() {
|
||||||
return popContextProvider$2(workInProgress), null;
|
return popContextProvider$2(workInProgress), null;
|
||||||
|
|
||||||
case HostRoot$7:
|
case HostRoot$7:
|
||||||
|
popHostContainer(workInProgress), popTopLevelContextObject$1(workInProgress);
|
||||||
var fiberRoot = workInProgress.stateNode;
|
var fiberRoot = workInProgress.stateNode;
|
||||||
return fiberRoot.pendingContext && (fiberRoot.context = fiberRoot.pendingContext,
|
return fiberRoot.pendingContext && (fiberRoot.context = fiberRoot.pendingContext,
|
||||||
fiberRoot.pendingContext = null), null !== current && null !== current.child || (popHydrationState(workInProgress),
|
fiberRoot.pendingContext = null), null !== current && null !== current.child || (popHydrationState(workInProgress),
|
||||||
|
@ -1935,7 +1945,7 @@ __DEV__ && function() {
|
||||||
if (!newProps) return invariant(null !== workInProgress.stateNode, "We must have new props for new mounts. This error is likely " + "caused by a bug in React. Please file an issue."),
|
if (!newProps) return invariant(null !== workInProgress.stateNode, "We must have new props for new mounts. This error is likely " + "caused by a bug in React. Please file an issue."),
|
||||||
null;
|
null;
|
||||||
var _currentHostContext = getHostContext();
|
var _currentHostContext = getHostContext();
|
||||||
if (popHydrationState(workInProgress)) prepareToHydrateHostInstance(workInProgress, rootContainerInstance) && markUpdate(workInProgress); else {
|
if (popHydrationState(workInProgress)) prepareToHydrateHostInstance(workInProgress, rootContainerInstance, _currentHostContext) && markUpdate(workInProgress); else {
|
||||||
var _instance = createInstance(type, newProps, rootContainerInstance, _currentHostContext, workInProgress);
|
var _instance = createInstance(type, newProps, rootContainerInstance, _currentHostContext, workInProgress);
|
||||||
appendAllChildren(_instance, workInProgress), finalizeInitialChildren(_instance, type, newProps, rootContainerInstance) && markUpdate(workInProgress),
|
appendAllChildren(_instance, workInProgress), finalizeInitialChildren(_instance, type, newProps, rootContainerInstance) && markUpdate(workInProgress),
|
||||||
workInProgress.stateNode = _instance;
|
workInProgress.stateNode = _instance;
|
||||||
|
@ -2375,8 +2385,8 @@ __DEV__ && function() {
|
||||||
fiber.stateNode = nextInstance, hydrationParentFiber = fiber, nextHydratableInstance = getFirstHydratableChild(nextInstance);
|
fiber.stateNode = nextInstance, hydrationParentFiber = fiber, nextHydratableInstance = getFirstHydratableChild(nextInstance);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function prepareToHydrateHostInstance(fiber, rootContainerInstance) {
|
function prepareToHydrateHostInstance(fiber, rootContainerInstance, hostContext) {
|
||||||
var instance = fiber.stateNode, updatePayload = hydrateInstance(instance, fiber.type, fiber.memoizedProps, rootContainerInstance, fiber);
|
var instance = fiber.stateNode, updatePayload = hydrateInstance(instance, fiber.type, fiber.memoizedProps, rootContainerInstance, hostContext, fiber);
|
||||||
return fiber.updateQueue = updatePayload, null !== updatePayload;
|
return fiber.updateQueue = updatePayload, null !== updatePayload;
|
||||||
}
|
}
|
||||||
function prepareToHydrateHostTextInstance(fiber) {
|
function prepareToHydrateHostTextInstance(fiber) {
|
||||||
|
@ -3203,7 +3213,7 @@ __DEV__ && function() {
|
||||||
};
|
};
|
||||||
var ReactNativeFiberInspector = {
|
var ReactNativeFiberInspector = {
|
||||||
getInspectorDataForViewTag: getInspectorDataForViewTag
|
getInspectorDataForViewTag: getInspectorDataForViewTag
|
||||||
}, ReactVersion = "16.0.0-rc.1", ReactCurrentOwner$3 = ReactGlobalSharedState_1.ReactCurrentOwner, warning$11 = require$$0;
|
}, ReactVersion = "16.0.0-rc.3", ReactCurrentOwner$3 = ReactGlobalSharedState_1.ReactCurrentOwner, warning$11 = require$$0;
|
||||||
function findNodeHandle(componentOrHandle) {
|
function findNodeHandle(componentOrHandle) {
|
||||||
var owner = ReactCurrentOwner$3.current;
|
var owner = ReactCurrentOwner$3.current;
|
||||||
if (null !== owner && null !== owner.stateNode && (warning$11(owner.stateNode._warnedAboutRefsInRender, "%s is accessing findNodeHandle inside its render(). " + "render() should be a pure function of props and state. It should " + "never access something that requires stale data from the previous " + "render, such as refs. Move this logic to componentDidMount and " + "componentDidUpdate instead.", getComponentName_1(owner) || "A component"),
|
if (null !== owner && null !== owner.stateNode && (warning$11(owner.stateNode._warnedAboutRefsInRender, "%s is accessing findNodeHandle inside its render(). " + "render() should be a pure function of props and state. It should " + "never access something that requires stale data from the previous " + "render, such as refs. Move this logic to componentDidMount and " + "componentDidUpdate instead.", getComponentName_1(owner) || "A component"),
|
||||||
|
@ -4422,7 +4432,7 @@ __DEV__ && function() {
|
||||||
unmountComponentAtNodeAndRemoveContainer: function(containerTag) {
|
unmountComponentAtNodeAndRemoveContainer: function(containerTag) {
|
||||||
ReactNativeFiber.unmountComponentAtNode(containerTag), UIManager.removeRootView(containerTag);
|
ReactNativeFiber.unmountComponentAtNode(containerTag), UIManager.removeRootView(containerTag);
|
||||||
},
|
},
|
||||||
unstable_createPortal: function(children, containerTag) {
|
createPortal: function(children, containerTag) {
|
||||||
var key = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : null;
|
var key = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : null;
|
||||||
return ReactPortal.createPortal(children, containerTag, null, key);
|
return ReactPortal.createPortal(children, containerTag, null, key);
|
||||||
},
|
},
|
||||||
|
|
|
@ -717,7 +717,9 @@ function popContextProvider(fiber) {
|
||||||
isContextProvider$1(fiber) && (pop(didPerformWorkStackCursor, fiber), pop(contextStackCursor, fiber));
|
isContextProvider$1(fiber) && (pop(didPerformWorkStackCursor, fiber), pop(contextStackCursor, fiber));
|
||||||
}
|
}
|
||||||
|
|
||||||
var popContextProvider_1 = popContextProvider, pushTopLevelContextObject = function(fiber, context, didChange) {
|
var popContextProvider_1 = popContextProvider, popTopLevelContextObject = function(fiber) {
|
||||||
|
pop(didPerformWorkStackCursor, fiber), pop(contextStackCursor, fiber);
|
||||||
|
}, pushTopLevelContextObject = function(fiber, context, didChange) {
|
||||||
invariant(null == contextStackCursor.cursor, "Unexpected context found on stack. " + "This error is likely caused by a bug in React. Please file an issue."),
|
invariant(null == contextStackCursor.cursor, "Unexpected context found on stack. " + "This error is likely caused by a bug in React. Please file an issue."),
|
||||||
push(contextStackCursor, context, fiber), push(didPerformWorkStackCursor, didChange, fiber);
|
push(contextStackCursor, context, fiber), push(didPerformWorkStackCursor, didChange, fiber);
|
||||||
};
|
};
|
||||||
|
@ -765,6 +767,7 @@ var processChildContext_1 = processChildContext$1, pushContextProvider = functio
|
||||||
isContextConsumer: isContextConsumer_1,
|
isContextConsumer: isContextConsumer_1,
|
||||||
isContextProvider: isContextProvider_1,
|
isContextProvider: isContextProvider_1,
|
||||||
popContextProvider: popContextProvider_1,
|
popContextProvider: popContextProvider_1,
|
||||||
|
popTopLevelContextObject: popTopLevelContextObject,
|
||||||
pushTopLevelContextObject: pushTopLevelContextObject,
|
pushTopLevelContextObject: pushTopLevelContextObject,
|
||||||
processChildContext: processChildContext_1,
|
processChildContext: processChildContext_1,
|
||||||
pushContextProvider: pushContextProvider,
|
pushContextProvider: pushContextProvider,
|
||||||
|
@ -796,7 +799,7 @@ var createWorkInProgress = function(current, renderPriority) {
|
||||||
var workInProgress = current.alternate;
|
var workInProgress = current.alternate;
|
||||||
return null === workInProgress ? (workInProgress = createFiber(current.tag, current.key, current.internalContextTag),
|
return null === workInProgress ? (workInProgress = createFiber(current.tag, current.key, current.internalContextTag),
|
||||||
workInProgress.type = current.type, workInProgress.stateNode = current.stateNode,
|
workInProgress.type = current.type, workInProgress.stateNode = current.stateNode,
|
||||||
workInProgress.alternate = current, current.alternate = workInProgress) : (workInProgress.effectTag = NoWork$1,
|
workInProgress.alternate = current, current.alternate = workInProgress) : (workInProgress.effectTag = NoEffect$1,
|
||||||
workInProgress.nextEffect = null, workInProgress.firstEffect = null, workInProgress.lastEffect = null),
|
workInProgress.nextEffect = null, workInProgress.firstEffect = null, workInProgress.lastEffect = null),
|
||||||
workInProgress.pendingWorkPriority = renderPriority, workInProgress.child = current.child,
|
workInProgress.pendingWorkPriority = renderPriority, workInProgress.child = current.child,
|
||||||
workInProgress.memoizedProps = current.memoizedProps, workInProgress.memoizedState = current.memoizedState,
|
workInProgress.memoizedProps = current.memoizedProps, workInProgress.memoizedState = current.memoizedState,
|
||||||
|
@ -1458,10 +1461,13 @@ var reconcileChildFibers$1 = ChildReconciler(!0, !0), reconcileChildFibersInPlac
|
||||||
memoizeProps(workInProgress, instance.props), hasContext && invalidateContextProvider$1(workInProgress, !0),
|
memoizeProps(workInProgress, instance.props), hasContext && invalidateContextProvider$1(workInProgress, !0),
|
||||||
workInProgress.child;
|
workInProgress.child;
|
||||||
}
|
}
|
||||||
function updateHostRoot(current, workInProgress, priorityLevel) {
|
function pushHostRootContext(workInProgress) {
|
||||||
var root = workInProgress.stateNode;
|
var root = workInProgress.stateNode;
|
||||||
root.pendingContext ? pushTopLevelContextObject$1(workInProgress, root.pendingContext, root.pendingContext !== root.context) : root.context && pushTopLevelContextObject$1(workInProgress, root.context, !1),
|
root.pendingContext ? pushTopLevelContextObject$1(workInProgress, root.pendingContext, root.pendingContext !== root.context) : root.context && pushTopLevelContextObject$1(workInProgress, root.context, !1),
|
||||||
pushHostContainer(workInProgress, root.containerInfo);
|
pushHostContainer(workInProgress, root.containerInfo);
|
||||||
|
}
|
||||||
|
function updateHostRoot(current, workInProgress, priorityLevel) {
|
||||||
|
pushHostRootContext(workInProgress);
|
||||||
var updateQueue = workInProgress.updateQueue;
|
var updateQueue = workInProgress.updateQueue;
|
||||||
if (null !== updateQueue) {
|
if (null !== updateQueue) {
|
||||||
var prevState = workInProgress.memoizedState, state = beginUpdateQueue$1(current, workInProgress, updateQueue, null, prevState, null, priorityLevel);
|
var prevState = workInProgress.memoizedState, state = beginUpdateQueue$1(current, workInProgress, updateQueue, null, prevState, null, priorityLevel);
|
||||||
|
@ -1526,6 +1532,10 @@ var reconcileChildFibers$1 = ChildReconciler(!0, !0), reconcileChildFibersInPlac
|
||||||
}
|
}
|
||||||
function bailoutOnLowPriority(current, workInProgress) {
|
function bailoutOnLowPriority(current, workInProgress) {
|
||||||
switch (workInProgress.tag) {
|
switch (workInProgress.tag) {
|
||||||
|
case HostRoot$5:
|
||||||
|
pushHostRootContext(workInProgress);
|
||||||
|
break;
|
||||||
|
|
||||||
case ClassComponent$6:
|
case ClassComponent$6:
|
||||||
pushContextProvider$1(workInProgress);
|
pushContextProvider$1(workInProgress);
|
||||||
break;
|
break;
|
||||||
|
@ -1588,8 +1598,7 @@ var reconcileChildFibers$1 = ChildReconciler(!0, !0), reconcileChildFibersInPlac
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case HostRoot$5:
|
case HostRoot$5:
|
||||||
var root = workInProgress.stateNode;
|
pushHostRootContext(workInProgress);
|
||||||
pushHostContainer(workInProgress, root.containerInfo);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -1608,7 +1617,7 @@ var reconcileChildFibers$1 = ChildReconciler(!0, !0), reconcileChildFibersInPlac
|
||||||
beginWork: beginWork,
|
beginWork: beginWork,
|
||||||
beginFailedWork: beginFailedWork
|
beginFailedWork: beginFailedWork
|
||||||
};
|
};
|
||||||
}, reconcileChildFibers$2 = ReactChildFiber.reconcileChildFibers, popContextProvider$2 = ReactFiberContext.popContextProvider, IndeterminateComponent$3 = ReactTypeOfWork.IndeterminateComponent, FunctionalComponent$3 = ReactTypeOfWork.FunctionalComponent, ClassComponent$8 = ReactTypeOfWork.ClassComponent, HostRoot$6 = ReactTypeOfWork.HostRoot, HostComponent$6 = ReactTypeOfWork.HostComponent, HostText$4 = ReactTypeOfWork.HostText, HostPortal$5 = ReactTypeOfWork.HostPortal, CoroutineComponent$3 = ReactTypeOfWork.CoroutineComponent, CoroutineHandlerPhase$1 = ReactTypeOfWork.CoroutineHandlerPhase, YieldComponent$3 = ReactTypeOfWork.YieldComponent, Fragment$3 = ReactTypeOfWork.Fragment, Placement$4 = ReactTypeOfSideEffect.Placement, Ref$2 = ReactTypeOfSideEffect.Ref, Update$2 = ReactTypeOfSideEffect.Update, OffscreenPriority$2 = ReactPriorityLevel.OffscreenPriority, ReactFiberCompleteWork = function(config, hostContext, hydrationContext) {
|
}, reconcileChildFibers$2 = ReactChildFiber.reconcileChildFibers, popContextProvider$2 = ReactFiberContext.popContextProvider, popTopLevelContextObject$1 = ReactFiberContext.popTopLevelContextObject, IndeterminateComponent$3 = ReactTypeOfWork.IndeterminateComponent, FunctionalComponent$3 = ReactTypeOfWork.FunctionalComponent, ClassComponent$8 = ReactTypeOfWork.ClassComponent, HostRoot$6 = ReactTypeOfWork.HostRoot, HostComponent$6 = ReactTypeOfWork.HostComponent, HostText$4 = ReactTypeOfWork.HostText, HostPortal$5 = ReactTypeOfWork.HostPortal, CoroutineComponent$3 = ReactTypeOfWork.CoroutineComponent, CoroutineHandlerPhase$1 = ReactTypeOfWork.CoroutineHandlerPhase, YieldComponent$3 = ReactTypeOfWork.YieldComponent, Fragment$3 = ReactTypeOfWork.Fragment, Placement$4 = ReactTypeOfSideEffect.Placement, Ref$2 = ReactTypeOfSideEffect.Ref, Update$2 = ReactTypeOfSideEffect.Update, OffscreenPriority$2 = ReactPriorityLevel.OffscreenPriority, ReactFiberCompleteWork = function(config, hostContext, hydrationContext) {
|
||||||
var createInstance = config.createInstance, createTextInstance = config.createTextInstance, appendInitialChild = config.appendInitialChild, finalizeInitialChildren = config.finalizeInitialChildren, prepareUpdate = config.prepareUpdate, getRootHostContainer = hostContext.getRootHostContainer, popHostContext = hostContext.popHostContext, getHostContext = hostContext.getHostContext, popHostContainer = hostContext.popHostContainer, prepareToHydrateHostInstance = hydrationContext.prepareToHydrateHostInstance, prepareToHydrateHostTextInstance = hydrationContext.prepareToHydrateHostTextInstance, popHydrationState = hydrationContext.popHydrationState;
|
var createInstance = config.createInstance, createTextInstance = config.createTextInstance, appendInitialChild = config.appendInitialChild, finalizeInitialChildren = config.finalizeInitialChildren, prepareUpdate = config.prepareUpdate, getRootHostContainer = hostContext.getRootHostContainer, popHostContext = hostContext.popHostContext, getHostContext = hostContext.getHostContext, popHostContainer = hostContext.popHostContainer, prepareToHydrateHostInstance = hydrationContext.prepareToHydrateHostInstance, prepareToHydrateHostTextInstance = hydrationContext.prepareToHydrateHostTextInstance, popHydrationState = hydrationContext.popHydrationState;
|
||||||
function markUpdate(workInProgress) {
|
function markUpdate(workInProgress) {
|
||||||
workInProgress.effectTag |= Update$2;
|
workInProgress.effectTag |= Update$2;
|
||||||
|
@ -1665,6 +1674,7 @@ var reconcileChildFibers$1 = ChildReconciler(!0, !0), reconcileChildFibersInPlac
|
||||||
return popContextProvider$2(workInProgress), null;
|
return popContextProvider$2(workInProgress), null;
|
||||||
|
|
||||||
case HostRoot$6:
|
case HostRoot$6:
|
||||||
|
popHostContainer(workInProgress), popTopLevelContextObject$1(workInProgress);
|
||||||
var fiberRoot = workInProgress.stateNode;
|
var fiberRoot = workInProgress.stateNode;
|
||||||
return fiberRoot.pendingContext && (fiberRoot.context = fiberRoot.pendingContext,
|
return fiberRoot.pendingContext && (fiberRoot.context = fiberRoot.pendingContext,
|
||||||
fiberRoot.pendingContext = null), null !== current && null !== current.child || (popHydrationState(workInProgress),
|
fiberRoot.pendingContext = null), null !== current && null !== current.child || (popHydrationState(workInProgress),
|
||||||
|
@ -1681,7 +1691,7 @@ var reconcileChildFibers$1 = ChildReconciler(!0, !0), reconcileChildFibersInPlac
|
||||||
if (!newProps) return invariant(null !== workInProgress.stateNode, "We must have new props for new mounts. This error is likely " + "caused by a bug in React. Please file an issue."),
|
if (!newProps) return invariant(null !== workInProgress.stateNode, "We must have new props for new mounts. This error is likely " + "caused by a bug in React. Please file an issue."),
|
||||||
null;
|
null;
|
||||||
var _currentHostContext = getHostContext();
|
var _currentHostContext = getHostContext();
|
||||||
if (popHydrationState(workInProgress)) prepareToHydrateHostInstance(workInProgress, rootContainerInstance) && markUpdate(workInProgress); else {
|
if (popHydrationState(workInProgress)) prepareToHydrateHostInstance(workInProgress, rootContainerInstance, _currentHostContext) && markUpdate(workInProgress); else {
|
||||||
var _instance = createInstance(type, newProps, rootContainerInstance, _currentHostContext, workInProgress);
|
var _instance = createInstance(type, newProps, rootContainerInstance, _currentHostContext, workInProgress);
|
||||||
appendAllChildren(_instance, workInProgress), finalizeInitialChildren(_instance, type, newProps, rootContainerInstance) && markUpdate(workInProgress),
|
appendAllChildren(_instance, workInProgress), finalizeInitialChildren(_instance, type, newProps, rootContainerInstance) && markUpdate(workInProgress),
|
||||||
workInProgress.stateNode = _instance;
|
workInProgress.stateNode = _instance;
|
||||||
|
@ -2095,8 +2105,8 @@ var injectInternals_1 = injectInternals$1, onCommitRoot_1 = onCommitRoot$1, onCo
|
||||||
fiber.stateNode = nextInstance, hydrationParentFiber = fiber, nextHydratableInstance = getFirstHydratableChild(nextInstance);
|
fiber.stateNode = nextInstance, hydrationParentFiber = fiber, nextHydratableInstance = getFirstHydratableChild(nextInstance);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function prepareToHydrateHostInstance(fiber, rootContainerInstance) {
|
function prepareToHydrateHostInstance(fiber, rootContainerInstance, hostContext) {
|
||||||
var instance = fiber.stateNode, updatePayload = hydrateInstance(instance, fiber.type, fiber.memoizedProps, rootContainerInstance, fiber);
|
var instance = fiber.stateNode, updatePayload = hydrateInstance(instance, fiber.type, fiber.memoizedProps, rootContainerInstance, hostContext, fiber);
|
||||||
return fiber.updateQueue = updatePayload, null !== updatePayload;
|
return fiber.updateQueue = updatePayload, null !== updatePayload;
|
||||||
}
|
}
|
||||||
function prepareToHydrateHostTextInstance(fiber) {
|
function prepareToHydrateHostTextInstance(fiber) {
|
||||||
|
@ -2882,7 +2892,7 @@ getInspectorDataForViewTag = function() {
|
||||||
|
|
||||||
var ReactNativeFiberInspector = {
|
var ReactNativeFiberInspector = {
|
||||||
getInspectorDataForViewTag: getInspectorDataForViewTag
|
getInspectorDataForViewTag: getInspectorDataForViewTag
|
||||||
}, ReactVersion = "16.0.0-rc.1";
|
}, ReactVersion = "16.0.0-rc.3";
|
||||||
|
|
||||||
function findNodeHandle(componentOrHandle) {
|
function findNodeHandle(componentOrHandle) {
|
||||||
if (null == componentOrHandle) return null;
|
if (null == componentOrHandle) return null;
|
||||||
|
@ -3691,7 +3701,7 @@ var ReactNativeFiber = {
|
||||||
unmountComponentAtNodeAndRemoveContainer: function(containerTag) {
|
unmountComponentAtNodeAndRemoveContainer: function(containerTag) {
|
||||||
ReactNativeFiber.unmountComponentAtNode(containerTag), UIManager.removeRootView(containerTag);
|
ReactNativeFiber.unmountComponentAtNode(containerTag), UIManager.removeRootView(containerTag);
|
||||||
},
|
},
|
||||||
unstable_createPortal: function(children, containerTag) {
|
createPortal: function(children, containerTag) {
|
||||||
var key = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : null;
|
var key = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : null;
|
||||||
return ReactPortal.createPortal(children, containerTag, null, key);
|
return ReactPortal.createPortal(children, containerTag, null, key);
|
||||||
},
|
},
|
||||||
|
|
|
@ -132,9 +132,6 @@
|
||||||
"bin": {
|
"bin": {
|
||||||
"react-native": "local-cli/wrong-react-native.js"
|
"react-native": "local-cli/wrong-react-native.js"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
|
||||||
"react": "16.0.0-beta.5"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"absolute-path": "^0.0.0",
|
"absolute-path": "^0.0.0",
|
||||||
"art": "^0.10.0",
|
"art": "^0.10.0",
|
||||||
|
@ -201,8 +198,8 @@
|
||||||
"jest": "^21",
|
"jest": "^21",
|
||||||
"mock-fs": "^4.4.1",
|
"mock-fs": "^4.4.1",
|
||||||
"prettier": "1.5.2",
|
"prettier": "1.5.2",
|
||||||
"react": "16.0.0-beta.5",
|
"react": "16.0.0-rc.3",
|
||||||
"react-test-renderer": "16.0.0-beta.5",
|
"react-test-renderer": "16.0.0-rc.3",
|
||||||
"shelljs": "0.6.0",
|
"shelljs": "0.6.0",
|
||||||
"sinon": "^2.2.0"
|
"sinon": "^2.2.0"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue