Skip to content

Conversation

@eps1lon
Copy link
Collaborator

@eps1lon eps1lon commented Nov 26, 2025

Same as #33634 but for use and promise-as-a-child.

An alternative to re-rendering would've been to eagerly collect use() calls but we know Error() is slow in v8.

The danger with lazily collecting use() is that the Thenable may be resolved when we abort.
In those cases we remove instrumentation on the last thenable to ensure we suspend again. To ensure Thenable subclasses can't observe the corrupted state, we noop .then.

The shown stack relies on sourcemaps with ignoreList. Otherwise it'll point into React internals. From the dispatcher we wouldn't know how many stacks we have to cut without a circular dependency to the React.use function.

test plan

@meta-cla meta-cla bot added the CLA Signed label Nov 26, 2025
@eps1lon eps1lon force-pushed the sebbie/fizz-thenable-abort branch 3 times, most recently from 7cbcc6a to b2a0edf Compare November 29, 2025 10:23
@eps1lon eps1lon force-pushed the sebbie/fizz-thenable-abort branch from b2a0edf to 7c6ae2e Compare November 29, 2025 15:57
@eps1lon eps1lon requested review from gnoff and unstubbable November 29, 2025 16:03
@eps1lon eps1lon marked this pull request as ready for review November 29, 2025 16:04
@eps1lon eps1lon force-pushed the sebbie/fizz-thenable-abort branch from 7c6ae2e to 15b04ea Compare November 30, 2025 11:38
@eps1lon eps1lon force-pushed the sebbie/fizz-thenable-abort branch from 15b04ea to c364caf Compare November 30, 2025 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant