Skip to content

Commit

Permalink
chore[react-devtools/renderer]: dont show strict mode warning for pro…
Browse files Browse the repository at this point in the history
…d renderer builds
  • Loading branch information
hoxyq committed Jun 30, 2024
1 parent 2e72ea8 commit 352da5e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/react-devtools-shared/src/backend/renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -1984,12 +1984,17 @@ export function attach(
}

if (isRoot) {
// Set supportsStrictMode to false for production renderer builds
const isNonProductionBuildOfRenderer = renderer.bundleType > 0;

pushOperation(TREE_OPERATION_ADD);
pushOperation(id);
pushOperation(ElementTypeRoot);
pushOperation((fiber.mode & StrictModeBits) !== 0 ? 1 : 0);
pushOperation(profilingFlags);
pushOperation(StrictModeBits !== 0 ? 1 : 0);
pushOperation(
isNonProductionBuildOfRenderer && StrictModeBits !== 0 ? 1 : 0,
);
pushOperation(hasOwnerMetadata ? 1 : 0);

if (isProfiling) {
Expand Down

0 comments on commit 352da5e

Please sign in to comment.