mirror of
https://github.com/zebrajr/react.git
synced 2026-01-15 12:15:22 +00:00
pass host context to finalizeInitialChildren (#11970)
* pass host context to finalizeInitialChildren * don't retrieve context an extra time
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user