Skip to content

Commit

Permalink
pass host context to finalizeInitialChildren (facebook#11970)
Browse files Browse the repository at this point in the history
* pass host context to finalizeInitialChildren

* don't retrieve context an extra time
  • Loading branch information
jquense authored and yenshih committed Jan 6, 2018
1 parent b558af2 commit b709579
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/react-reconciler/src/ReactFiberCompleteWork.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -315,6 +317,7 @@ export default function<T, P, I, TI, HI, PI, C, CC, CX, PL>(
type,
newProps,
rootContainerInstance,
currentHostContext,
)
) {
markUpdate(workInProgress);
Expand Down Expand Up @@ -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
};
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -506,6 +511,7 @@ export default function<T, P, I, TI, HI, PI, C, CC, CX, PL>(
type,
newProps,
rootContainerInstance,
currentHostContext,
)
) {
markUpdate(workInProgress);
Expand Down
1 change: 1 addition & 0 deletions packages/react-reconciler/src/ReactFiberReconciler.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit b709579

Please sign in to comment.