@samitouri / QOS-React-1 / commits / 5e11e7fc20

[heathcheck] Check for namespaced StrictMode (#29076)

Previously, we only checked for StrictMode by searching for `<StrictMode>` but we should also check for the namespaced version, `<React.StrictMode>`. Fixes https://github.com/facebook/react/issues/29075

Sathya Gunasekaran committed May 15, 2024 at 14:15 UTC 5e11e7fc203754cf95e27baed957c581b9ba44b8
1 file changed +1 -1
compiler/packages/react-compiler-healthcheck/src/checks/strictMode.ts
+1 -1
@@ -8,7 +8,7 @@
8 import chalk from "chalk";
9
10 const JsFileExtensionRE = /(js|ts|jsx|tsx)$/;
11 -const StrictModeRE = /\<StrictMode\>/;
11 +const StrictModeRE = /<(React\.StrictMode|StrictMode)>/;
12 let StrictModeUsage = false;
13
14 export default {