[compiler] _exp version of ValidateNoDerivedComputationsInEffects take precedence over stable version when enabled (#35099)
Summary: We should only run one version of the validation. I think it makes sense that if the exp version is enable it takes precedence over the stable one --- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/react/pull/35099). * __->__ #35099 * #35100
Jorge Cabiedes committed
Nov 11, 2025 at 10:16 UTC
5e94655cbbeae6f4b1806fdbfbb9902b136fa574
1 file changed
+2
-4
compiler/packages/babel-plugin-react-compiler/src/Entrypoint/Pipeline.ts
+2
-4
@@ -272,12 +272,10 @@ function runWithEnvironment(
272
validateNoSetStateInRender(hir).unwrap();
273
}
274
275
- if (env.config.validateNoDerivedComputationsInEffects) {
276
- validateNoDerivedComputationsInEffects(hir);
277
- }
278
-
275
if (env.config.validateNoDerivedComputationsInEffects_exp) {
276
env.logErrors(validateNoDerivedComputationsInEffects_exp(hir));
277
+ } else if (env.config.validateNoDerivedComputationsInEffects) {
278
+ validateNoDerivedComputationsInEffects(hir);
279
}
280
281
if (env.config.validateNoSetStateInEffects) {