Skip to content

Commit b709579

Browse files
jquenseyenshih
authored andcommitted
pass host context to finalizeInitialChildren (facebook#11970)
* pass host context to finalizeInitialChildren * don't retrieve context an extra time
1 parent b558af2 commit b709579

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

packages/react-reconciler/src/ReactFiberCompleteWork.js

+6
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ export default function<T, P, I, TI, HI, PI, C, CC, CX, PL>(
195195
oldProps: P,
196196
newProps: P,
197197
rootContainerInstance: C,
198+
currentHostContext: CX,
198199
) {
199200
// TODO: Type this specific to this type of component.
200201
workInProgress.updateQueue = (updatePayload: any);
@@ -288,6 +289,7 @@ export default function<T, P, I, TI, HI, PI, C, CC, CX, PL>(
288289
oldProps: P,
289290
newProps: P,
290291
rootContainerInstance: C,
292+
currentHostContext: CX,
291293
) {
292294
// If there are no effects associated with this node, then none of our children had any updates.
293295
// 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>(
315317
type,
316318
newProps,
317319
rootContainerInstance,
320+
currentHostContext,
318321
)
319322
) {
320323
markUpdate(workInProgress);
@@ -369,6 +372,7 @@ export default function<T, P, I, TI, HI, PI, C, CC, CX, PL>(
369372
oldProps: P,
370373
newProps: P,
371374
rootContainerInstance: C,
375+
currentHostContext: CX,
372376
) {
373377
// Noop
374378
};
@@ -450,6 +454,7 @@ export default function<T, P, I, TI, HI, PI, C, CC, CX, PL>(
450454
oldProps,
451455
newProps,
452456
rootContainerInstance,
457+
currentHostContext,
453458
);
454459

455460
if (current.ref !== workInProgress.ref) {
@@ -506,6 +511,7 @@ export default function<T, P, I, TI, HI, PI, C, CC, CX, PL>(
506511
type,
507512
newProps,
508513
rootContainerInstance,
514+
currentHostContext,
509515
)
510516
) {
511517
markUpdate(workInProgress);

packages/react-reconciler/src/ReactFiberReconciler.js

+1
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ export type HostConfig<T, P, I, TI, HI, PI, C, CC, CX, PL> = {
6565
type: T,
6666
props: P,
6767
rootContainerInstance: C,
68+
hostContext: CX,
6869
): boolean,
6970

7071
prepareUpdate(

0 commit comments

Comments
 (0)