pass host context to finalizeInitialChildren (#11970)

* pass host context to finalizeInitialChildren

* don't retrieve context an extra time
This commit is contained in:
Jason Quense
2018-01-05 10:52:19 -05:00
committed by GitHub
parent 30dac4e78d
commit 8d336aa97e
2 changed files with 7 additions and 0 deletions

View File

@@ -195,6 +195,7 @@ export default function<T, P, I, TI, HI, PI, C, CC, CX, PL>(
oldProps: P,
newProps: P,
rootContainerInstance: C,
currentHostContext: CX,
) {
// TODO: Type this specific to this type of component.
workInProgress.updateQueue = (updatePayload: any);
@@ -288,6 +289,7 @@ export default function<T, P, I, TI, HI, PI, C, CC, CX, PL>(
oldProps: P,
newProps: P,
rootContainerInstance: C,
currentHostContext: CX,
) {
// If there are no effects associated with this node, then none of our children had any updates.
// This guarantees that we can reuse all of them.
@@ -315,6 +317,7 @@ export default function<T, P, I, TI, HI, PI, C, CC, CX, PL>(
type,
newProps,
rootContainerInstance,
currentHostContext,
)
) {
markUpdate(workInProgress);
@@ -369,6 +372,7 @@ export default function<T, P, I, TI, HI, PI, C, CC, CX, PL>(
oldProps: P,
newProps: P,
rootContainerInstance: C,
currentHostContext: CX,
) {
// Noop
};
@@ -450,6 +454,7 @@ export default function<T, P, I, TI, HI, PI, C, CC, CX, PL>(
oldProps,
newProps,
rootContainerInstance,
currentHostContext,
);
if (current.ref !== workInProgress.ref) {
@@ -506,6 +511,7 @@ export default function<T, P, I, TI, HI, PI, C, CC, CX, PL>(
type,
newProps,
rootContainerInstance,
currentHostContext,
)
) {
markUpdate(workInProgress);

View File

@@ -65,6 +65,7 @@ export type HostConfig<T, P, I, TI, HI, PI, C, CC, CX, PL> = {
type: T,
props: P,
rootContainerInstance: C,
hostContext: CX,
): boolean,
prepareUpdate(