Backport React 19 use API - #32
Draft
christopher-buss wants to merge 5 commits into
Draft
Conversation
Co-authored-by: Codex <noreply@openai.com>
christopher-buss
marked this pull request as draft
August 31, 2026 21:23
Load the thenable helper inside the two error paths so Studio debug.loadmodule can compile the near-limit WorkLoop chunk. Co-authored-by: Codex <noreply@openai.com>
Document the React 17 replay and thenable-tracking divergences, correct pinned source ranges, and make the test ledger match the actual port. Port the fulfilled-thenable regression and preserve observable scheduler yield order across the translated use cases. Co-authored-by: Codex <noreply@openai.com>
Match the upstream warning count and text contract while allowing React 17's console harness to append the component stack. Co-authored-by: Codex <noreply@openai.com>
Use the upstream development wrapper and production array shapes without an unnecessary React-Luau deviation. Co-authored-by: Codex <noreply@openai.com>
christopher-buss
force-pushed
the
backport-react-19-use
branch
2 times, most recently
from
September 6, 2026 17:20
f1299c6 to
706beab
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
use(Context)and cached Promise-compatible thenable readsusecalls without normal Hook orderingCompatibility boundary
This is the client cached-Promise API. Promises must be created and cached outside render, must settle normally, and expose
andThen. React 19 server/RSC behavior, cache APIs, hydration, sibling prewarming, Actions, Promise-as-child, async components, and uncached component replay are excluded. Roblox Promise cancellation is unsupported because ordinaryandThenlisteners are not notified reliably.React-Luau 17 has no React 19
SuspendedOnImmediatereplay state machine. The opaqueuseexception is therefore converted before the existing unwind, Suspense capture, ping, and retry path; the cached Promise's instrumented status survives the retry.Provenance
ae74234eae6ebd62f19190731278e20bc1c37d51ReactUse-test.jslines 534-568: exactly one warning containing the complete upstream texttoErrorDevassertion validates the stack instead of incorrectly requiring its absence; this adaptation is marked at the test siteThe implementation and complete test/deviation classification are pinned in
docs/backports/react-19-use.md.Verification
Exact candidate:
706beab31c8dd20dc824e2254743da0bd87dfedc/ treef82a837524a8281e9c3af8c6e8450124b056bc7728c57e5d4ab256956980c4fd3bf9f4d3c865630e: identity 1/1; ReactUse 13/14, with the expected warning text/count and component stack rejected only by the unsupported no-stack matcher optiondebug.loadmodulererun: identity 1/1 and complete ReactUse 14/14, including the try/catch warning regression1E1168AB3994E61A079852A148CCD70E4965C1C65374EF31E729337CBF92B59F2302E858AE23831EBBE5FF0BFF2A351940F97CF6CEFE78C733940E835910457DA5800572BCEBADA709F02E0BA9C9E486EEC8919B40CBCDBFD7D5D71BF07E7C71FAEEADA030DAA0BC6D41CBB8085E1CED9E3A1F3E13E7FA81FD2B6D03A5050E67D9984A6FE84B2A031B55DA85B5470C88EFAF73C4F7819C3434FA3159F8E84A59bin/ci.sh: dependency installation, Roblox analysis, and DEV/release runtime stages remain unavailable locally because the pinned Roblox-internal Foreman sources and required CLI binaries are not accessibleGenerated with Codex.