Skip to content

Expose ReactDOM Flight hint internals#11

Draft
southpolesteve wants to merge 1 commit intoTanStack:mainfrom
southpolesteve:codex/redact-flight-hint-internals
Draft

Expose ReactDOM Flight hint internals#11
southpolesteve wants to merge 1 commit intoTanStack:mainfrom
southpolesteve:codex/redact-flight-hint-internals

Conversation

@southpolesteve
Copy link
Copy Markdown
Collaborator

Summary

  • Add the ReactDOM internal object expected by react-server-dom-webpack/client.edge.
  • Provide no-op resource hint handlers for Flight hint rows (H rows) plus the findDOMNode/priority shape React expects.
  • Cover the new public DOM export in the export snapshot test.

Why

vinext uses the RSC client decoder from react-server-dom-webpack/client.edge. That decoder reads ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.d when it processes Flight hint rows for preload/preinit/resource hints. Without that object, a vinext app can successfully receive SSR HTML from Redact but then crash while decoding the Flight stream on the client.

The handlers are no-ops for now because these hints are opportunistic resource hints, and vinext also injects modulepreload links through its Vite/RSC pipeline. This gives Redact the compatibility shape needed for vinext demos without taking on a larger resource scheduling implementation yet.

Validation

  • pnpm --filter tests test -- public-exports

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant