SIGN IN SIGN UP
facebook / react UNCLAIMED

The library for web and native user interfaces.

0 0 0 JavaScript

[Flight] Serialize already resolved Promises as debug models (#33588)

We already support serializing the values of instrumented Promises as
debug values such as in console logs. However, we don't support plain
native promises.

This waits a microtask to see if we can read the value within a
microtask and if so emit it. This is so that we can still close the
connection.

Otherwise, we emit a "halted" row into its row id which replaces the old
"Infinite Promise" reference.

We could potentially wait until the end of the render before cancelling
so that if it resolves before we exit we can still include its value but
that would require a bit more work. Ideally we'd have a way to get these
lazily later anyway.
S
Sebastian Markbåge committed
1d1b26c701893f4821ebdc6547bcd1efc392f679
Parent: fe3f0ec
Committed by GitHub <[email protected]> on 6/22/2025, 9:51:31 PM