@samitouri / QOS-React / commits / 8d336aa97e

pass host context to finalizeInitialChildren (#11970)

* pass host context to finalizeInitialChildren * don't retrieve context an extra time

Jason Quense committed Jan 5, 2018 at 10:52 UTC 8d336aa97e9b514dabe78d8192fd58ccdd99aa7a
2 files changed +7
packages/react-reconciler/src/ReactFiberCompleteWork.js
+6
@@ -195,6 +195,7 @@ export default function<T, P, I, TI, HI, PI, C, CC, CX, PL>(
195 oldProps: P,
196 newProps: P,
197 rootContainerInstance: C,
198 + currentHostContext: CX,
199 ) {
200 // TODO: Type this specific to this type of component.
201 workInProgress.updateQueue = (updatePayload: any);
@@ -288,6 +289,7 @@ export default function<T, P, I, TI, HI, PI, C, CC, CX, PL>(
289 oldProps: P,
290 newProps: P,
291 rootContainerInstance: C,
292 + currentHostContext: CX,
293 ) {
294 // If there are no effects associated with this node, then none of our children had any updates.
295 // 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>(
317 type,
318 newProps,
319 rootContainerInstance,
320 + currentHostContext,
321 )
322 ) {
323 markUpdate(workInProgress);
@@ -369,6 +372,7 @@ export default function<T, P, I, TI, HI, PI, C, CC, CX, PL>(
372 oldProps: P,
373 newProps: P,
374 rootContainerInstance: C,
375 + currentHostContext: CX,
376 ) {
377 // Noop
378 };
@@ -450,6 +454,7 @@ export default function<T, P, I, TI, HI, PI, C, CC, CX, PL>(
454 oldProps,
455 newProps,
456 rootContainerInstance,
457 + currentHostContext,
458 );
459
460 if (current.ref !== workInProgress.ref) {
@@ -506,6 +511,7 @@ export default function<T, P, I, TI, HI, PI, C, CC, CX, PL>(
511 type,
512 newProps,
513 rootContainerInstance,
514 + currentHostContext,
515 )
516 ) {
517 markUpdate(workInProgress);
packages/react-reconciler/src/ReactFiberReconciler.js
+1
@@ -65,6 +65,7 @@ export type HostConfig<T, P, I, TI, HI, PI, C, CC, CX, PL> = {
65 type: T,
66 props: P,
67 rootContainerInstance: C,
68 + hostContext: CX,
69 ): boolean,
70
71 prepareUpdate(