Skip to content

[Flight] rename prerender to unstable_prerender and include in stable channel - #31724

Merged
gnoff merged 1 commit into
react:mainfrom
gnoff:add-unstable-prerender-flight
Dec 10, 2024
Merged

gnoff merged 1 commit into
react:mainfrom
gnoff:add-unstable-prerender-flight

Conversation

@gnoff

@gnoff gnoff commented Dec 10, 2024 •

Copy link
Copy Markdown
Collaborator

We added an experimental prerender API to flight. This change exposes this API in stable channels prefixed as unstable_prerender. We have high confidence this API should exist but because we have not yet settled on how to handle resuming/replaying of RSC streams we may need to change the API contract to suit future needs. This release will allow us to get more usage out of the existing implemented functionality without requiring you to use experimental builds which will open up greater adoption and opportunity for feedback.

the prerender implementation is documented in the react-server package. As with all RSC APIs implemented in bundler specific binding packages these aren't intended to be called by end users but instead be used by frameworks implementing React Server Components.

Previously prerender was exposed unprefixed and only in the experimental channel. This PR renames the export across all channels to unstable_prerender so users of this previously unprefixed api will need to update to the unstable form. This isn't a breaking change because it was only exposed in the experimental channel which does not follow semver. The reason we don't expose it under both names is that users may feature detect the unprefixed form and then when we finally do ship it as unprefixed we may change the function signature and break this code. Changing the name now is much safer.

@vercel

vercel Bot commented Dec 10, 2024 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-compiler-playground ✅ Ready (Inspect) Visit Preview