Don't mark portals for updates (#11255)

This commit is contained in:
Dan Abramov
2017-10-17 20:53:15 +01:00
committed by GitHub
parent 94e8e9d88e
commit 0e5767824f
3 changed files with 2 additions and 11 deletions

View File

@@ -162,10 +162,6 @@ module.exports = function<T, P, I, TI, PI, C, CX, PL>(
// We have no life-cycles associated with text.
return;
}
case HostPortal: {
// We have no life-cycles associated with portals.
return;
}
default: {
invariant(
false,
@@ -589,9 +585,6 @@ module.exports = function<T, P, I, TI, PI, C, CX, PL>(
case HostRoot: {
return;
}
case HostPortal: {
return;
}
default: {
invariant(
false,

View File

@@ -372,8 +372,6 @@ module.exports = function<T, P, I, TI, PI, C, CX, PL>(
case Fragment:
return null;
case HostPortal:
// TODO: Only mark this as an update if we have any pending callbacks.
markUpdate(workInProgress);
popHostContainer(workInProgress);
return null;
// Error cases

View File

@@ -237,8 +237,8 @@ exports[`ReactDebugFiberPerf supports portals 1`] = `
⚛ Parent [mount]
⚛ Child [mount]
⚛ (Committing Changes)
⚛ (Committing Host Effects: 3 Total)
⚛ (Calling Lifecycle Methods: 1 Total)
⚛ (Committing Host Effects: 2 Total)
⚛ (Calling Lifecycle Methods: 0 Total)
"
`;