Skip to content

Commit

Permalink
Fix disableStrictPassiveEffect not working under Suspense (#26989)
Browse files Browse the repository at this point in the history
In #26914 I added an extra logic
to turn off double useEffect if there is an `Offscreen`
tag. But `Suspense` uses `Offscreen` tag internally and that turns off
`disableStrictPassiveEffect` for everything.

DiffTrain build for commit 70e998a.
  • Loading branch information
tyao1 committed Jun 22, 2023
1 parent b3ec754 commit bd47c8a
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<8b35d681c01d550a6b69db76a1733d08>>
* @generated SignedSource<<78e16f0583c5e93e8b989135cc106bd4>>
*/

'use strict';
Expand Down Expand Up @@ -23769,11 +23769,6 @@ function createFiberFromSuspenseList(pendingProps, mode, lanes, key) {
return fiber;
}
function createFiberFromOffscreen(pendingProps, mode, lanes, key) {
{
// StrictMode in Offscreen should always run double passive effects
mode &= ~NoStrictPassiveEffectsMode;
}

var fiber = createFiber(OffscreenComponent, pendingProps, key, mode);
fiber.elementType = REACT_OFFSCREEN_TYPE;
fiber.lanes = lanes;
Expand Down Expand Up @@ -23934,7 +23929,7 @@ function createFiberRoot(
return root;
}

var ReactVersion = "18.3.0-canary-c8deb5db6-20230622";
var ReactVersion = "18.3.0-canary-70e998a10-20230622";

// Might add PROFILE later.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8617,7 +8617,7 @@ var devToolsConfig$jscomp$inline_1031 = {
throw Error("TestRenderer does not support findFiberByHostInstance()");
},
bundleType: 0,
version: "18.3.0-canary-c8deb5db6-20230622",
version: "18.3.0-canary-70e998a10-20230622",
rendererPackageName: "react-test-renderer"
};
var internals$jscomp$inline_1230 = {
Expand Down Expand Up @@ -8648,7 +8648,7 @@ var internals$jscomp$inline_1230 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-canary-c8deb5db6-20230622"
reconcilerVersion: "18.3.0-canary-70e998a10-20230622"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1231 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9043,7 +9043,7 @@ var devToolsConfig$jscomp$inline_1073 = {
throw Error("TestRenderer does not support findFiberByHostInstance()");
},
bundleType: 0,
version: "18.3.0-canary-c8deb5db6-20230622",
version: "18.3.0-canary-70e998a10-20230622",
rendererPackageName: "react-test-renderer"
};
var internals$jscomp$inline_1271 = {
Expand Down Expand Up @@ -9074,7 +9074,7 @@ var internals$jscomp$inline_1271 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-canary-c8deb5db6-20230622"
reconcilerVersion: "18.3.0-canary-70e998a10-20230622"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1272 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ if (
}
"use strict";

var ReactVersion = "18.3.0-canary-c8deb5db6-20230622";
var ReactVersion = "18.3.0-canary-70e998a10-20230622";

// ATTENTION
// When adding new symbols to this file,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -642,4 +642,4 @@ exports.useSyncExternalStore = function (
);
};
exports.useTransition = useTransition;
exports.version = "18.3.0-canary-c8deb5db6-20230622";
exports.version = "18.3.0-canary-70e998a10-20230622";
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@ exports.useSyncExternalStore = function (
);
};
exports.useTransition = useTransition;
exports.version = "18.3.0-canary-c8deb5db6-20230622";
exports.version = "18.3.0-canary-70e998a10-20230622";

/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
if (
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
c8deb5db660f3f6eeca30d29b4bd48d9e82b3792
70e998a1064cc1e8e8f9103e0c00d37fbbcf71c1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<514b18ed9abf66bd67c35f8d3892be26>>
* @generated SignedSource<<a02015addfe15f9f3c0a64ed2df2baae>>
*/

'use strict';
Expand Down Expand Up @@ -27025,11 +27025,6 @@ function createFiberFromSuspenseList(pendingProps, mode, lanes, key) {
return fiber;
}
function createFiberFromOffscreen(pendingProps, mode, lanes, key) {
{
// StrictMode in Offscreen should always run double passive effects
mode &= ~NoStrictPassiveEffectsMode;
}

var fiber = createFiber(OffscreenComponent, pendingProps, key, mode);
fiber.elementType = REACT_OFFSCREEN_TYPE;
fiber.lanes = lanes;
Expand Down Expand Up @@ -27249,7 +27244,7 @@ function createFiberRoot(
return root;
}

var ReactVersion = "18.3.0-canary-8ff97f72";
var ReactVersion = "18.3.0-canary-6ea864da";

function createPortal$1(
children,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<14c435eed21e626d0548f1265b3a2ab8>>
* @generated SignedSource<<8f036c0125a599ffea1d8d0e0001b6d9>>
*/

'use strict';
Expand Down Expand Up @@ -27539,11 +27539,6 @@ function createFiberFromSuspenseList(pendingProps, mode, lanes, key) {
return fiber;
}
function createFiberFromOffscreen(pendingProps, mode, lanes, key) {
{
// StrictMode in Offscreen should always run double passive effects
mode &= ~NoStrictPassiveEffectsMode;
}

var fiber = createFiber(OffscreenComponent, pendingProps, key, mode);
fiber.elementType = REACT_OFFSCREEN_TYPE;
fiber.lanes = lanes;
Expand Down Expand Up @@ -27763,7 +27758,7 @@ function createFiberRoot(
return root;
}

var ReactVersion = "18.3.0-canary-a48d7fee";
var ReactVersion = "18.3.0-canary-e9a186c1";

function createPortal$1(
children,
Expand Down

0 comments on commit bd47c8a

Please sign in to comment.