You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: compiler/packages/babel-plugin-react-compiler/src/Validation/ValidateNoDerivedComputationsInEffects_exp.ts
// Check if the value being set is derived from useFragment (Relay)
821
+
if(argMetadata.typeOfValue==='fromRelay'){
822
+
console.log('relay');
823
+
context.errors.pushDiagnostic(
824
+
CompilerDiagnostic.create({
825
+
description:
826
+
'Deriving value from Relay store. Instead of holding it in a local state, use a client schema extension to store the value directly in the Relay store.',
827
+
category: ErrorCategory.EffectDerivationsOfState,
828
+
reason:
829
+
'Avoid storing Relay data in React state. Use client schema extensions instead.',
830
+
}).withDetails({
831
+
kind: 'error',
832
+
loc: instr.value.callee.loc,
833
+
message:
834
+
'setState with Relay-derived value. Use client schema instead.',
0 commit comments