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
[Flight] Don't warn for key, but error for ref (#19986)
* Improve error message by expanding the object in question
* Don't warn for key/ref getters
* Error if refs are passed in server components or to client components
Copy file name to clipboardexpand all lines: scripts/error-codes/codes.json
+3-2
Original file line number
Diff line number
Diff line change
@@ -340,7 +340,7 @@
340
340
"348": "ensureListeningTo(): received a container that was not an element node. This is likely a bug in React.",
341
341
"349": "Expected a work-in-progress root. This is a bug in React. Please file an issue.",
342
342
"350": "Cannot read from mutable source during the current render without tearing. This is a bug in React. Please file an issue.",
343
-
"351": "Unsupported type.",
343
+
"351": "Unsupported server component type: %s",
344
344
"352": "React Blocks (and Lazy Components) are expected to be replaced by a compiler on the server. Try configuring your compiler set up and avoid using React.lazy inside of Blocks.",
345
345
"353": "A server block should never encode any other slots. This is a bug in React.",
346
346
"354": "getInspectorDataForViewAtPoint() is not available in production.",
@@ -366,5 +366,6 @@
366
366
"375": "Functions cannot be passed directly to client components because they're not serializable. Remove %s (%s) from this object, or avoid the entire object: %s",
367
367
"376": "Symbol values (%s) cannot be passed to client components. Remove %s from this object, or avoid the entire object: %s",
368
368
"377": "BigInt (%s) is not yet supported in client component props. Remove %s from this object or use a plain number instead: %s",
369
-
"378": "Type %s is not supported in client component props. Remove %s from this object, or avoid the entire object: %s"
369
+
"378": "Type %s is not supported in client component props. Remove %s from this object, or avoid the entire object: %s",
370
+
"379": "Refs cannot be used in server components, nor passed to client components."
0 commit comments