next.js
5dfd866e - Treat _debugInfo as a wellknown property for sync request data access purposes (#78942)

Commit
311 days ago
Treat _debugInfo as a wellknown property for sync request data access purposes (#78942) When we converted our request access APIs to async we supported sync access to make the adoption easier. We do have a list of certain builtin properties that exist on promises or are tested for in the course of runtime operations that we say are not synchronously accessible however and you must await the request data promise to access those if necessary. Recently it was discoverd that React will check the `_debugInfo` property of thenables and other async data types in dev. This was being reported as a warning when passing searchParams from RSC to client world. By adding `_debugInfo` to the wellKnownProperties set we can avoid this warning by also making it so you must await the promise to access a true request value such as `?_debugInfo=...` in a search string. This change adds this property name to the well known set
Author
Parents
Loading