Don't mark portals for updates (#11255)
Dan Abramov committed
Oct 17, 2017 at 20:53 UTC
0e5767824f4c1122e94de61b0392a6942df642ab
3 files changed
+2
-11
src/renderers/shared/fiber/ReactFiberCommitWork.js
-7
@@ -162,10 +162,6 @@ module.exports = function<T, P, I, TI, PI, C, CX, PL>(
162
// We have no life-cycles associated with text.
163
return;
164
}
165
- case HostPortal: {
166
- // We have no life-cycles associated with portals.
167
- return;
168
- }
165
default: {
166
invariant(
167
false,
@@ -589,9 +585,6 @@ module.exports = function<T, P, I, TI, PI, C, CX, PL>(
585
case HostRoot: {
586
return;
587
}
592
- case HostPortal: {
593
- return;
594
- }
588
default: {
589
invariant(
590
false,
src/renderers/shared/fiber/ReactFiberCompleteWork.js
-2
@@ -372,8 +372,6 @@ module.exports = function<T, P, I, TI, PI, C, CX, PL>(
372
case Fragment:
373
return null;
374
case HostPortal:
375
- // TODO: Only mark this as an update if we have any pending callbacks.
376
- markUpdate(workInProgress);
375
popHostContainer(workInProgress);
376
return null;
377
// Error cases
src/renderers/shared/fiber/__tests__/__snapshots__/ReactIncrementalPerf-test.js.snap
+2
-2
@@ -237,8 +237,8 @@ exports[`ReactDebugFiberPerf supports portals 1`] = `
237
⚛ Parent [mount]
238
⚛ Child [mount]
239
⚛ (Committing Changes)
240
- ⚛ (Committing Host Effects: 3 Total)
241
- ⚛ (Calling Lifecycle Methods: 1 Total)
240
+ ⚛ (Committing Host Effects: 2 Total)
241
+ ⚛ (Calling Lifecycle Methods: 0 Total)
242
"
243
`;
244